boostboost::filesystem::detail::copy_file undefined when using c++14
Hello I am building an application that uses boost libraries that I also complied. This is on a mac os x 10.9 system using gnu gcc 5.2 installed with mac ports. I built the boost 1.59.0 libraries as instructed and built the application without any problems (after a few tries). Then I changed the c++ language standard for the build of the application to -std=gnu++14 (the default is gnu++11). However, I now get the following error during the linking phase: g++ -std=gnu++14 -U_WIN32 -Dunix -DNDEBUG -O3 -DTIXML_USE_STL -DBOOST_FILESYSTEM_VERSION=3 -fmessage-length=0 -I[...] -lboost_date_time-mt -lboost_filesystem-mt -lboost_regex-mt -lboost_system-mt -lboost_locale-mt -lboost_thread-mt -lboost_chrono-mt [...] Undefined symbols for architecture x86_64: "boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option, boost::system::error_code*)", referenced from: [...] ... ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status [...] I rebuilt the boost libraries with the -std=gnu++14 option and verified that they are using the same std library, but I still got the same error when linking those libraries to my application. I removed the c++14 option from the application build and the error went away. So next I took a look at the functions in libboost_filesystem-mt.a and for lib/libboost_filesystem-mt.a(operations.o) I found this function: 0000000000007720 T __ZN5boost10filesystem6detail9copy_fileERKNS0_4pathES4_NS1_11copy_optionEPNS_6system10error_codeE or boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::detail::copy_option, boost::system::error_code*) I see that this differs from what the linker is looking for in that copy_option (third parameter) is in the detail name space. Any ideas on where to go from here? Thanks
participants (1)
-
ken