要使Eclipse使用DDS,您必须在项目属性中添加这些配置:
PROJECT→PROPERTIES→C / C ++ GENERAL→PATH 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→路径和符号→库路径ou PROJECT→PROPERTIES→C / C ++ Build→Settings→Cross G ++ Linker→Libraries→Library search path(-L)→+
/yourddspath/lib
项目→物业→C / C ++构建→设置→交叉G ++链接器→库→库(-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
目前,我还不知道如何在生成的文件夹中自动执行prebuild idl生成。我只使用makefile和prebuild terminal命令作为make idl。如果有人可以帮助预建idl代,请告诉我!