问题
To get Eclipse working with DDS, you have to add these configurations in Project properties:
PROJECT→PROPERTIES→C/C++ GENERAL→PATHS AND SYMBOLS→INCLUDES→GNU C++
/yourddspath/include/sys
/yourddspath/include/dcps/C++/SACPP
/PROJECTNAME/idl/generated (added like path of your project).
PROJECT→PROPERTIES→C/C++ GENERAL→PATHS AND SYMBOLS→Library Paths ou PROJECT→PROPERTIES→C/C++ Build→Settings→Cross G++ Linker→Libraries→Library search path (-L)→+
/yourddspath/lib
PROJECT→PROPERTIES→C/C++ Build→Settings→Cross G++ Linker→Libraries→Libraries (-l)→+
pthread
ddskernel
dcpssacpp
libbgs_types.a
dl
PROJECT→PROPERTIES→C/C++ Build→Environnement→Add ou Edit
SPLICE_ORB=DDS_OpenFusion_1_6_1
SPLICE_JDK=jdk
OSPL_HOME=/yourddspath
VORTEX_DIR=/yourddspath/etc
PATH=/yourddspath/bin:$PATH (WARNING,Here $PATH is preexisting PATH environement variable)
CPATH=/yourddspath/include:/yourddspath/include/sys
LD_LIBRARY_PATH=/yourddspath/lib
OSPL_URI=file:yourddspath/etc/config/ospl.xml
OSPL_TMPL_PATH=/yourddspath/etc/idlpp
For now, I don't know how to automatically execute prebuild idl generation in generated folder. I just use a makefile and a prebuild terminal command as make idl. If someone can help to prebuild idl generation, let me know!
来源:https://stackoverflow.com/questions/44756629/configure-eclipse-to-work-with-opensplice-dds