Oxford-PTAM/PTAM-GPL

Linking problem on MacOS 10.11 and arch i386

Opened this issue · 0 comments

Hello.
I want to compile project on MacOS 10.11 with arch i386 and have several problem with linking.

System information (version)
  • Operating System / Platform => MacOS 10.11.6 (15G1421)
  • Compiler => Apple LLVM version 8.0.0 (clang-800.0.42.1)
Log

Undefined symbols for architecture i386:
"CVD::glDrawText(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, CVD::TEXT_STYLE, double, double)", referenced from:
GLWindow2::PrintString(CVD::ImageRef, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >) in GLWindow2.cpp.o
"CVD::GLWindow::swap_buffers()", referenced from:
CameraCalibrator::Run() in CameraCalibrator.cpp.o
"CVD::GLWindow::handle_events(CVD::GLWindow::EventHandler&)", referenced from:
GLWindow2::HandlePendingEvents() in GLWindow2.cpp.o
"CVD::GLWindow::init(CVD::ImageRef const&, int, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
CVD::GLWindow::GLWindow(CVD::ImageRef const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in GLWindow2.cpp.o
"CVD::GLWindow::~GLWindow()", referenced from:
GLWindow2::~GLWindow2() in CameraCalibrator.cpp.o
GLWindow2::GLWindow2(CVD::ImageRef, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >) in GLWindow2.cpp.o
GLWindow2::~GLWindow2() in GLWindow2.cpp.o
"CVD::glSetFont(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
GLWindow2::GLWindow2(CVD::ImageRef, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >) in GLWindow2.cpp.o
"CVD::GLWindow::size() const", referenced from:
GLWindow2::DrawMenus() in GLWindow2.cpp.o
GLWindow2::SetupWindowOrtho() in GLWindow2.cpp.o
GLWindow2::SetupVideoRasterPosAndZoom() in GLWindow2.cpp.o
GLWindow2::SetupViewport() in GLWindow2.cpp.o
GLWindow2::DrawCaption(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >) in GLWindow2.cpp.o
ld: symbol(s) not found for architecture i386

But libcvd, gvars - builded for i386. And I'm compiling with keys:
cmake .. -DCMAKE_OSX_ARCHITECTURES="i386"

> lipo -info /usr/local/lib/libcvd.a input file /usr/local/lib/libcvd.a is not a fat file Non-fat file: /usr/local/lib/libcvd.a is architecture: i386

> lipo -info /usr/local/lib/libGVars3-0.6.dylib Non-fat file: /usr/local/lib/libGVars3-0.6.dylib is architecture: i386

How can I fix it?
Thanks.