undefined reference to `DDSDomainParticipantFactory::get_instance()'

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


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_IDL = sensor.idl
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...
# 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.
# 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
        HelloWorld.cxx \
        HelloWorldPlugin.cxx \
        HelloWorldSupport.cxx \
    HelloWorld.h \
    HelloWorldPlugin.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. 

Last seen: 4 weeks 1 day ago
Joined: 09/23/2018
Posts: 60

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.


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


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?