c++ - ldd says library isn't found by compile completes successfully -


i attempting compile project. compiles successfully. make command exits status code of 0 , there no errors displayed.

however, project not working, , when run ldd -d <file> shows have 2 libraries not found.

>ldd -d output_file.so     linux-gate.so.1 =>  (0xf77e0000)     libvstdlib_srv.so => not found     libtier0_srv.so => not found     libm.so.6 => /lib/libm.so.6 (0xf7760000)     libdl.so.2 => /lib/libdl.so.2 (0xf775b000)     libc.so.6 => /lib/libc.so.6 (0xf75a9000)     /lib/ld-linux.so.2 (0x46e4a000) undefined symbol: pfvectornormalize     (output_file.so) undefined symbol: _z12vectoranglesrk6vectorr6qangle     (output_file.so) undefined symbol: pfsqrt       (output_file.so) undefined symbol: __cxa_guard_acquire   (output_file.so) undefined symbol: __cxa_guard_release   (output_file.so) undefined symbol: _z6conmsgpkcz (output_file.so) undefined symbol: warning      (output_file.so) undefined symbol: __dynamic_cast        (output_file.so) undefined symbol: _z11concolormsgrk5colorpkcz   (output_file.so) undefined symbol: error (output_file.so) undefined symbol: assertvalidstringptr  (output_file.so) undefined symbol: _assertvalidwriteptr  (output_file.so) undefined symbol: _assertvalidreadptr   (output_file.so) undefined symbol: _ztvn10__cxxabiv121__vmi_class_type_infoe     (output_file.so) undefined symbol: _ztvn10__cxxabiv120__si_class_type_infoe      (output_file.so) undefined symbol: _ztvn10__cxxabiv117__class_type_infoe (output_file.so) undefined symbol: __gxx_personality_v0  (output_file.so) 

these 2 libraries set symbolic links actual location of file:

... lrwxrwxrwx 1 andy andy    62 may  2 12:30 libtier0_srv.so -> /home/dev/sdks/hl2sdk-ob-valve/lib/linux/libtier0_srv.so lrwxrwxrwx 1 andy andy    64 may  2 12:30 libvstdlib_srv.so -> /home/dev/sdks/hl2sdk-ob-valve/lib/linux/libvstdlib_srv.so -rw-r--r-- 1 andy andy  5444 may  2 11:53 makefile ... 

the gcc command being run is

gcc -i/home/dev/sdks/hl2sdk-ob-valve/public/game/server -i. -i.. -icentity -isdk -i/home/dev/project1/hl2sdk-ob-valve/public -i/home/dev/sdks/hl2sdk-ob-valve/public/engine -i/home/dev/sdks/hl2sdk-ob-valve/public/tier0 -i/home/dev/sdks/hl2sdk-ob-valve/public/tier1 -i/home/dev/sdks/hl2sdk-ob-valve/public/mathlib -i/home/dev/project1/mmsource-central/core -i/home/dev/project1/mmsource-central/core/sourcehook -i/home/dev/project1/sourcemod-central/public -i/home/dev/project1/sourcemod-central/public/sourcepawn -i/home/dev/project1/sourcemod-central/core project1_output/sdk/smsdk_ext.o project1_output/extension.o project1_output/ctrackingprojectile.o project1_output/csentryrocket.o project1_output/cprojectilerocket.o project1_output/cprojectilearrow.o project1_output/cprojectileflare.o project1_output/cprojectilepipe.o project1_output/cprojectilesyringe.o project1_output/centity/centity.o project1_output/centity/centitymanager.o project1_output/centity/cplayer.o /home/dev/project1/hl2sdk-ob-valve/lib/linux/tier1_i486.a libvstdlib_srv.so libtier0_srv.so -m32 -lm -ldl -static-libgcc -shared -o project1_output/output_file.so

my questions are: 1.) why 2 libraries not found though symlinked? 2.) undefined symbols part of mathlib package, included in gcc command. -i/home/dev/sdks/hl2sdk-ob-valve/public/mathlib why these undefined, despite being included?

c++ not language of choice , know enough makefiles dangerous, not fix anything, apologize if not enough information. can provide more needed.

the library files shared objects, means not resolved until run time. in order ldd find them (assuming linux or other unix variant) need add path libraries ld_library_path (there path env can used can't think of right now) , ldd should able find library.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -