From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of mahmood n via Boost-users
Sent: 17 October 2017 15:23
To: Alex Perry; boost-users@lists.boost.org
Cc: mahmood n
Subject: Re: [Boost-users] Many undefined references for libboost_filesystem
So, I finally found how to see the invoked command!
Here is the full output with the command. The libraries do exist, so why on earth it can not link :(
mahmood@vb:AES$ g++ -fPIC -L/home/mahmood/boost_1_54_0/stage/lib -lboost_filesystem -lboost_system -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
Does adding –v option (verbose) to this line tell you anything helpful?
(like the directories it is searching? - or, more likely, not searching ;-) )
Paul
---
Paul A. Bristow
Prizet Farmhouse
Kendal UK LA8 8AB
+44 (0) 1539 561830
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()'
aescuda.cpp:(.text.startup+0x697): undefined reference to `boost::system::get_generic_category()'
aescuda.cpp:(.text.startup+0x6a3): undefined reference to `boost::system::get_generic_category()'
aescuda.cpp:(.text.startup+0x6af): undefined reference to `boost::system::get_generic_category()'
aescuda.cpp:(.text.startup+0x6bb): undefined reference to `boost::system::get_system_category()'
obj/x86_64/release/aesCudaUtils.cpp.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)':
aesCudaUtils.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x22): undefined reference to `boost::system::get_system_category()'
aesCudaUtils.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x6b): undefined reference to `boost::filesystem::detail::status_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::system::error_code&)'
obj/x86_64/release/aesCudaUtils.cpp.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, unsigned long>::type boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)':
aesCudaUtils.cpp:(.text._ZN5boost10filesystem9file_sizeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEmE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, unsigned long>::type boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x55): undefined reference to `boost::filesystem::detail::file_size_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
obj/x86_64/release/aesCudaUtils.cpp.o: In function `_GLOBAL__sub_I_aesCudaUtils.cpp':
aesCudaUtils.cpp:(.text.startup+0x5): undefined reference to `boost::system::get_system_category()'
aesCudaUtils.cpp:(.text.startup+0x11): undefined reference to `boost::system::get_generic_category()'
aesCudaUtils.cpp:(.text.startup+0x1d): undefined reference to `boost::system::get_generic_category()'
aesCudaUtils.cpp:(.text.startup+0x29): undefined reference to `boost::system::get_generic_category()'
aesCudaUtils.cpp:(.text.startup+0x35): undefined reference to `boost::system::get_system_category()'
collect2: ld returned 1 exit status
mahmood@vb:AES$ ls /home/mahmood/boost_1_54_0/stage/lib/libboost_system.*
/home/mahmood/boost_1_54_0/stage/lib/libboost_system.a
/home/mahmood/boost_1_54_0/stage/lib/libboost_system.so
/home/mahmood/boost_1_54_0/stage/lib/libboost_system.so.1.54.0
mahmood@vb:AES$ ls /home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.*
/home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.a
/home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.so
/home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.so.1.54.0
mahmood@vb:AES$
Sent from Mail for Windows 10