I'm trying to run the tutorial example of OpenSplice using Qt5. I successfully built the program but when I run it I get the following error :
Error in DDS::DomainParticipantFactory::create_participant: Creation failed: invalid handle
After many debugging steps I came to the conclusion that my executable doesn't link to my ospl ! I figured that out because when it crashes no ospl-error.log is generated.
I sourced the release file correctly . ./release.com
and launched my qtcreator from the same terminal so all the environment variables are correctly set (especially OSPL_URI
and OSPL_HOME
)
Does anyone have any idea on how to fix this ?
I finally managed to solve this problem and thought of sharing the answer. The problem was that I was including all the DDS libs in my .pro I was including the following libs :
unix:!macx: LIBS += -L$$PWD/../../PrismTech/Vortex_v2/Device/VortexOpenSplice/6.7.1/HDE/x86_64.linux/lib/ -lcmagent -lcmjni -lcmsoap -lcmxml -ldbmsconnect -ldcpsc99 -ldcpsccpp -ldcpsgapi -ldcpsisocpp -ldcpsisocpp2 -ldcpssac -ldcpssacpp -ldcpssaj -lddsconf -lddsconfparser -lddsdatabase -lddshts -lddsi2 -lddsi2e -lddskernel -lddsos -lddsosnet -lddsrmi -lddsrrstorage -lddsserialization -lddsuser -lddsutil -ldurability -lfacecpp -lleveldb-ospl -llzf-ospl -lnetworking -lnwbridge -lrlm913 -lrnr -lsigar-amd64-linux -lsnappy-ospl -lsnetworking -lspliced -lsqlite3-ospl -lstreamsccpp -lstreamsisocpp -lstreamssacpp
INCLUDEPATH += $$PWD/../../PrismTech/Vortex_v2/Device/VortexOpenSplice/6.7.1/HDE/x86_64.linux/include
DEPENDPATH += $$PWD/../../PrismTech/Vortex_v2/Device/VortexOpenSplice/6.7.1/HDE/x86_64.linux/include
I am now using a minimal set of libs that the program requires and now it runs perfectly. Here is what I am using now:
unix:!macx: LIBS += -L$$PWD/../PrismTech/Vortex_v2/Device/VortexOpenSplice/6.7.1/HDE/x86_64.linux/lib/ -lddskernel -ldcpsisocpp
INCLUDEPATH += $$PWD/../PrismTech/Vortex_v2/Device/VortexOpenSplice/6.7.1/HDE/x86_64.linux/include
DEPENDPATH += $$PWD/../PrismTech/Vortex_v2/Device/VortexOpenSplice/6.7.1/HDE/x86_64.linux/include
Actually the error is caused by -ldcpsccpp and -lddshts. By removing those libs the application works perfectly.