Boost logo

Boost Users :

Subject: Re: [Boost-users] Many undefined references for libboost_filesystem
From: Daniel Anderson (wonixen_at_[hidden])
Date: 2017-10-17 21:28:29


is it possible the gcc linker is not finding the proper lib file ?

all look good, I assume that the linker is add lib in front of the
name of your argument, does it add suffix also ?

look for an option to get the list of libs it found when trying to link.

2 thinks can happen:

the lib name is not the one you think (in windows they have .lib
extension, not .so)
it finds another lib with the same name in another directory.

you have the link cmd, use it directly it will be easier maybe to find
your problem

make sure you understand all the options use for linking, your problem
could be there also.

2017-10-17 12:50 GMT-04:00 mahmood n via Boost-users
<boost-users_at_[hidden]>:
>>Does adding –v option (verbose) to this line tell you anything helpful?
>
>>(like the directories it is searching? - or, more likely, not searching
>> ;-) )
>
>
>
>
>
>
>
> Here it is. I don’t see anything useful in the verbose output. Do you?
>
>
>
>
>
> mahmood_at_vb:AES$ g++ -v -fPIC -L/home/mahmood/boost_1_54_0/stage/lib
> -lboost_filesystem -m64 -o
> /home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES
> obj/x86_64/release/aescuda.cpp.o obj/x86_64/release/aesCudaUtils.cpp.o
> obj/x86_64/release/aesHost.cu.o -L/usr/local/cuda/lib64
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart
> -L/usr/local/cuda/lib64
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart
> -lcutil_x86_64 -lshrutil_x86_64
>
> Using built-in specs.
>
> COLLECT_GCC=g++
>
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
>
> Target: x86_64-linux-gnu
>
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
> 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
> --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
> --program-suffix=-4.6 --enable-shared --enable-linker-build-id
> --with-system-zlib --libexecdir=/usr/lib --without-included-gettext
> --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
> --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
> --enable-libstdcxx-debug --enable-libstdcxx-time=yes
> --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror
> --with-arch-32=i686 --with-tune=generic --enable-checking=release
> --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
>
> Thread model: posix
>
> gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
>
> COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/
>
> LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../:/lib/:/usr/lib/
>
> COLLECT_GCC_OPTIONS='-v' '-fPIC' '-L/home/mahmood/boost_1_54_0/stage/lib'
> '-m64' '-o'
> '/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES'
> '-L/usr/local/cuda/lib64'
> '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib'
> '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux'
> '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib'
> '-L/usr/local/cuda/lib64'
> '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib'
> '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux'
> '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib'
> '-shared-libgcc' '-mtune=generic' '-march=x86-64'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.6/collect2 --sysroot=/ --build-id
> --no-add-needed --as-needed --eh-frame-hdr -m elf_x86_64 --hash-style=gnu
> -dynamic-linker /lib64/ld-linux-x86-64..so.2 -z relro -o
> /home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o
> /usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o
> -L/home/mahmood/boost_1_54_0/stage/lib -L/usr/local/cuda/lib64
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib
> -L/usr/local/cuda/lib64
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib
> -L/usr/lib/gcc/x86_64-linux-gnu/4.6
> -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu
> -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu
> -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
> -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lboost_filesystem
> obj/x86_64/release/aescuda.cpp.o obj/x86_64/release/aesCudaUtils.cpp.o
> obj/x86_64/release/aesHost.cu.o -lcudart -lcudart -lcutil_x86_64
> -lshrutil_x86_64 -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
> /usr/lib/gcc/x86_64-linux-gnu/4.6/crtend.o
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o
>
> obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':
>
> aescuda.cpp:(.text.startup+0x68b): undefined reference to
> `boost::system::get_system_category()'
>
> ….
>
>
>
>
>
>
>
>
>
> Sent from Mail for Windows 10
>
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users

-- 
Daniel
L'action accède à la perfection quand, bien que vivant, vous êtes déjà mort
Bunan

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net