I am being struggling for a while with the following issue:
My machine:
- Yosemite 10.10.1,
- Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.0.0 Thread model: posix
- Xcode Version 6.1.1 (6A2008a) (with command line tools installed)
What I want to do:
- Port my developing library and applications to this machine using Qt portability.
My library is compiled has an static library and has several libraries dependencies such as OpenCV, CGAL, MLpack, dlib, armadillo, alglib, boost, and other packages. I compiled most of them using c++11 support and -stdlib=libc++ compilation flag, except for OpenCV (from trunk repository) that do not have c++11 support and uses -stdlib=libstdc++ to compile cuda support modules.
If a create an application that uses this libraries directly and together I do not have any linking problem. However the problem is when a use my compiled static library in the application. For instance I get some errors like the following one:
Undefined symbols for architecture x86_64: "std::basic_string, std::allocator
::basic_string(std::string&&)", referenced from: std::basic_string, std::allocator > std::operator+, std::allocator >(std::basic_string, std::allocator >&&, char const*) in libVPP.a(VPPModuleMotion.o) std::basic_string, std::allocator > std::operator+, std::allocator >(char const*, std::basic_string, std::allocator >&&) in libVPP.a(VPPModuleMotion.o) std::basic_string, std::allocator > std::operator+, std::allocator >(std::basic_string, std::allocator >&&, char const*) in libVPP.a(VPPUtilMotionFunctions.o) std::basic_string, std::allocator > std::operator+, std::allocator >(char const*, std::basic_string, std::allocator >&&) in libVPP.a(VPPUtilMotionFunctions.o) std::basic_string, std::allocator > std::operator+, std::allocator >(std::basic_string, std::allocator >&&, char const*) in libVPP.a(VPPFeatureFast.o) std::basic_string, std::allocator > std::operator+, std::allocator >(std::basic_string, std::allocator >&&, std::basic_string, std::allocator > const&) in libVPP.a(VPPFeatureFast.o) std::basic_string, std::allocator > std::operator+, std::allocator >(std::basic_string, std::allocator >&&, char const*) in libVPP.a(VPPFeatureDetector.o) ... "std::string::operator=(std::string&&)", referenced from: VPPModuleMotion::process() in libVPP.a(VPPModuleMotion.o) segmentDenseFlowVectorField(cv::Mat&, CvSize&) in libVPP.a(VPPUtilMotionFunctions.o) VPPFeatureKeyPoint::visualize() in libVPP.a(VPPFeatureKeyPoint.o) VPPLocalSettings::VPPLocalSettings() in libVPP.a(VPPLocalSettings.o) VPPLocalSettings::setProcessXmlFileName(std::string const&) in libVPP.a(VPPLocalSettings.o)
"std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)", referenced from: std::list >::_M_transfer(std::_List_iterator, std::_List_iterator, std::_List_iterator) in libVPP.a(VPPUtilMotionFunctions.o) std::list >::_M_transfer(std::_List_iterator, std::_List_iterator, std::_List_iterator) in libVPP.a(VPPMotionOpticalFlow.o)
"std::__detail::_List_node_base::swap(std::__detail::_List_node_base&, std::__detail::_List_node_base&)", referenced from: std::list >::swap(std::list >&) in libVPP.a(VPPUtilMotionFunctions.o) std::list >::swap(std::list >&) in libVPP.a(VPPMotionOpticalFlow.o)
"std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)", referenced from: void std::list >::_M_insert(std::_List_iterator, float const&&&) in libVPP.a(VPPUtilMotionFunctions.o) void std::list >::_M_insert(std::_List_iterator, float const&&&) in libVPP.a(VPPMotionOpticalFlow.o)
"std::__detail::_List_node_base::_M_unhook()", referenced from: std::list >::_M_erase(std::_List_iterator) in libVPP.a(VPPUtilMotionFunctions.o) std::list >::_M_erase(std::_List_iterator) in libVPP.a(VPPMotionOpticalFlow.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [http://ift.tt/1uW8c7s] Error 1 15:22:24: The process "/usr/bin/make" exited with code 2. Error while building/deploying project TestVPPLib (kit: Desktop Qt 5.4.0 clang 64bit) When executing step "Make"
I compile my library with the same flags and options as the library dependencies. I am getting stuck in this issue and I need to port my library and applications. I am using Qt Creator (Qt 5.4.0 clang 64 bit) to compile my library, my applications, and also I use it to compile some dependency libraries.
Any help please will be appreciated.
Thanks.
Aucun commentaire:
Enregistrer un commentaire