Tuesday, 15 March 2011

c++ - eclipse CDT: searching /usr/lib although not in lib search path -



c++ - eclipse CDT: searching /usr/lib although not in lib search path -

i trying run bit of pcl code (from website). currently, on ubuntu, using boost 1_51 (that built) , in eclipse c++ build->settings have /home/aly/libs/boost_1_51_0/stage/include in include path , /home/aly/libs/boost_1_51_0/stage/lib in library search path. not have /usr/include or /usr/lib.

at runtime getting boost error, made me think perhaps not running against right libraries boost_1_46 built in /usr/lib (this date version in ubuntu repos). removed lib file (libboost_timer.so) /usr/lib dir , recompiled (which fine) , ran. @ runtime got next error:

error while loading shared libraries: libboost_thread.so.1.46.1: cannot open shared object file: n

my question is, why if /usr/include , /usr/lib aren't in include path , library search paths, programme looking 1.46 version?

additional info:

to compile eclipse doing: invoking: cross g++ linker

g++ -l/home/aly/libs/opencv-2.4.3/release/lib -l/home/aly/libs/boost_1_51_0/stage/lib -o "3dobjectdetection" ./src/hfnodesplitcalculator.o ./src/hfnodeutils.o ./src/hftreenode.o ./src/houghforest.o ./src/imagepatch.o ./src/main.o ./src/patchgenerator.o ./src/utils.o -lvtkmetaio -lvtkimaging -lvtkio -lvtkviews -lvtkvolumerendering -lvtkalglib -lvtkdicomparser -lvtkinfovis -lvtkfiltering -lvtkgeovis -lgl -lopencv_core -lopencv_highgui -lopencv_imgproc -lpcl_io -lpcl_visualization -lpcl_common -lpcl_surface -lpcl_kdtree -lpcl_search -lpcl_geometry -lpcl_features -lvtkproj4 -lvtkparallel -lvtksys -lvtkrendering -lvtkcommon -lboost_serialization -lboost_timer -lpthread -lboost_context -lboost_date_time -lboost_system -lboost_thread -lboost_filesystem -lboost_random -lboost_regex -lglut -lvtkexoiic -lvtkcharts -lvtkgenericfiltering finished building target: 3dobjectdetection

and $ld_library_path

:/home/aly/libs/boost_1_51_0/stage/lib/:/home/aly/libs/opencv-2.4.2/build/lib/:/usr/lib/:/home/aly/libs/cuda-5.0/lib:/home/aly/libs/cuda-5.0/lib64

as can see boost lib dir appears before /usr/lib

c++ ubuntu linker eclipse-cdt dynamic-linking

No comments:

Post a Comment