undefined reference to `DDSDomainParticipantFactory::get_instance()'

3 posts / 0 new
Last post
Offline
Last seen: 3 years 11 months ago
Joined: 03/23/2020
Posts: 2
undefined reference to `DDSDomainParticipantFactory::get_instance()'

Hello,

I'm trying to run RTI DDS example "HelloWorld C++", in QT over Windows10.

I've set the environemnt variables: 

  • NDDSHOME : C:\rti_connext_dds-6.0.1\lib\x64Win64VS2017
  • Path :C:\rti_connext_dds-6.0.1\lib\x64Win64VS2017

And my .pro file looks like this:

QT -= gui
 
CONFIG += c++ console module #diferences between C++ and C++11 to create .c/.h files from .idl
CONFIG -= app_bundle
 
# Specify path to RTI installation
RTIDDS_PREFIX = C:\\rti_connext_dds-6.0.1
RTIDDS_VERSION = x64Win64VS2010
 
RTIDDS_IDL = sensor.idl
 
#include(dds.pri)
INCLUDEPATH  +=  C:/rti_connext_dds-6.0.1/include
INCLUDEPATH  +=  C:/rti_connext_dds-6.0.1/include/ndds
INCLUDEPATH  +=  C:/rti_connext_dds-6.0.1/include/ndds/dds_cpp
INCLUDEPATH  +=  C:/rti_connext_dds-6.0.1/libs/x64Win64VS2017
 
#dynamic debug
 
#compiler flags! architecture...
DEFINES += RTI_WIN32
DEFINES += NDDS_DLL_VARIABLE
 
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
 
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
 
SOURCES += \
        HelloWorld.cxx \
        HelloWorldPlugin.cxx \
        HelloWorldSupport.cxx \
        HelloWorld_publisher.cxx
 
HEADERS += \
    HelloWorld.h \
    HelloWorldPlugin.h \
    HelloWorldSupport.h
 
LIBS += -L"C:/rti_connext_dds-6.0.1/lib/x64Win64VS2017/"  -lnddscppd -lnddscd -lnddscored -lrticonnextmsgcppd -lrtidlcppd

I don't know what else I'm missing becasue I cannot have access to the DDS classes: 

"undefined reference to DDSDomainParticipantFactory::get_instance()"

The same with DDSDAtaReader and Writer...

I'd be appreciated with any hint to proceed with this.

Thanks a lot. 

Offline
Last seen: 1 month 1 week ago
Joined: 09/23/2018
Posts: 62

There may be multiple problems but one that sticks out is that you are setting the $NDDSHOME environmental variable  to the wrong location.   Typically this is set a few levels up.   In your case, it should be set to C:\rti_connext_dds-6.0.1.   

We provide a few helpful scripts to set the NDDSHOME and path: C:\rti_connext_dds-6.0.1\resource\scripts\rtisetenv_x64Win64VS2017.bat.

Also, one of my colleagues also mentioned that since this is Windows, you might have to use an escaped backslash for path delimiters:    e.g.   C:\\ .... \\......

Hope this helps.

 

Offline
Last seen: 3 years 11 months ago
Joined: 03/23/2020
Posts: 2

Hello,

Thanks a lot for your response. 

I've introduced those changes but still stuck in the same problem. I run the .bat script, and all the environment variables are set. Any suggestion to move forward?