2- In $CIAO_ROOT and using default GNUmakefile generated by mwc.pl type gnuace CIAO_TAO_DAnCE.wmc (an script to help generate makefiles), i started the compilation with ‘make’, and at some point of the compilation process an error occurs:
QCC -fexceptions -fno-inline -pipe -W -Wall -Wpointer-arith -I/usr/include -I/usr/local/ACE_wrappers/contrib/utility -p
ipe -W -Wall -Wpointer-arith -Y gpp -I/usr/local/ACE_wrappers -I/usr/local/ACE_wrappers/TAO/CIAO -DACE_NDEBUG -DACE
USE_RCSID=0 -DACE_HAS_EXCEPTIONS -DACE_NO_INLINE -I…/…/…/…/…/include/boost-1_35 -I…/…/…/…/…/. -I… -I…/CCF -I
…/…/…/contrib/utility -L/opt/lib -fexceptions -L/usr/local/ACE_wrappers/ace -L./ -L/usr/local/ACE_wrappers/lib -L/us
r/local/ACE_wrappers/TAO/CIAO/ciao -L. -L…/…/…/…/…/lib -L…/CCF/CCF -L…/…/…/lib -o cidlc .obj/AttributeHeaderEmi
tters.o .obj/cidlc.o .obj/CompositionEmitter.o .obj/CorbaTypeNameEmitters.o .obj/CxxNamePrinter.o .obj/DescriptorGenerat
or.o .obj/EmitterBase.o .obj/EmitterContext.o .obj/ExecImplGenerator.o .obj/ExecImplHeaderGenerator.o .obj/ExecImplSourc
eGenerator.o .obj/ExecutorMappingGenerator.o .obj/InterfaceEmitter.o .obj/Literals.o .obj/ModuleEmitter.o .obj/Operation
HeaderEmitters.o .obj/RepositoryIdGenerator.o .obj/ServantGenerator.o .obj/ServantHeaderGenerator.o .obj/ServantSourceGe
nerator.o .obj/SizeTypeCalculator.o .obj/UtilityTypeNameEmitters.o -lCIDL -lIDL3 -lIDL2 -lCodeGenerationKit -lCompilerEl
ements -lboost_regex-mt-1_35 -lboost_filesystem-mt-1_35 -lsocket -lstdc++ -lm
/usr/qnx632/host/qnx6/x86/usr/bin/i386-pc-nto-qnx6.3.0-ld: warning: bin.v2/libs/system/build/qcc/release/threading-multi
/libboost_system-mt-1_35.so.1.35.0, needed by …/…/…/…/…/lib/libboost_filesystem-mt-1_35.so, not found (try using -r
path or -rpath-link)
.obj/AttributeHeaderEmitters.o: In function __static_initialization_and_destruction_0(int, int)': .obj/AttributeHeaderEmitters.o(.text+0xf75): undefined reference to boost::system::get_system_category()’
.obj/AttributeHeaderEmitters.o(.text+0xf8e): undefined reference to boost::system::get_posix_category()' .obj/AttributeHeaderEmitters.o(.text+0xfa7): undefined reference to boost::system::get_posix_category()’
.obj/AttributeHeaderEmitters.o(.text+0xfc0): undefined reference to boost::system::get_system_category()' .obj/cidlc.o: In function __static_initialization_and_destruction_0(int, int)’:
.obj/cidlc.o(.text+0x34a1): undefined reference to boost::system::get_system_category()' .obj/cidlc.o(.text+0x34ba): undefined reference to boost::system::get_posix_category()’
.obj/cidlc.o(.text+0x34d3): undefined reference to boost::system::get_posix_category()' .obj/cidlc.o(.text+0x34ec): undefined reference to boost::system::get_system_category()’
.obj/CompositionEmitter.o: In function __static_initialization_and_destruction_0(int, int)': .obj/CompositionEmitter.o(.text+0x34b): undefined reference to boost::system::get_system_category()’
.obj/CompositionEmitter.o(.text+0x364): undefined reference to boost::system::get_posix_category()' .obj/CompositionEmitter.o(.text+0x37d): undefined reference to boost::system::get_posix_category()’
.obj/CompositionEmitter.o(.text+0x396): undefined reference to boost::system::get_system_category()' .obj/CorbaTypeNameEmitters.o: In function __static_initialization_and_destruction_0(int, int)’:
.obj/CorbaTypeNameEmitters.o(.text+0x85cf): undefined reference to boost::system::get_system_category()' .obj/CorbaTypeNameEmitters.o(.text+0x85e8): undefined reference to boost::system::get_posix_category()’
.obj/CorbaTypeNameEmitters.o(.text+0x8601): undefined reference to boost::system::get_posix_category()' .obj/CorbaTypeNameEmitters.o(.text+0x861a): undefined reference to boost::system::get_system_category()’
.obj/DescriptorGenerator.o: In function __static_initialization_and_destruction_0(int, int)': .obj/DescriptorGenerator.o(.text+0x977): undefined reference to boost::system::get_system_category()’
.obj/DescriptorGenerator.o(.text+0x990): undefined reference to boost::system::get_posix_category()' .obj/DescriptorGenerator.o(.text+0x9a9): undefined reference to boost::system::get_posix_category()’
.obj/DescriptorGenerator.o(.text+0x9c2): undefined reference to `boost::system::get_system_category()’
Questions:
Why the linker do not recognize the include directory ( -I…/…/…/…/…/include/boost-1_35 ) that has a boost files ?
If the boost libraries (libboost_system-mt-1_35.so.1.35.0 and libboost_filesystem-mt-1_35.so) are in the same diretory /usr/lib, why the linker shows the warning “not found”? Please, i do not figure out the error that is happens. I suppose that it is only necessary to indicate the correct path to the linker, bu i am not sure.
To add paths to the linker the option is -L (el) not -I (). When specifying a library don’t specify the full path. If the library is called libboost.a use -lboost (the linker adds lib and .a).