-
Notifications
You must be signed in to change notification settings - Fork 45
undefined reference to `boost::timer' libraries while building #15
Description
I am trying to build OpenMPL project. However some errors happens with the boost library
[ 99%] Linking CXX executable OpenMPL CMakeFiles/OpenMPL.dir/main.cpp.o: In functionmain':
main.cpp:(.text.startup+0xc4): undefined reference to boost::timer::auto_cpu_timer::auto_cpu_timer(std::string const&)' libOpenMPL_lib.a(SimpleMPL.cpp.o): In function SimpleMPL::SimpleMPL::read_gds()':
SimpleMPL.cpp:(.text+0x337): undefined reference to boost::timer::auto_cpu_timer::auto_cpu_timer(std::string const&)' libOpenMPL_lib.a(SimpleMPL.cpp.o): In function SimpleMPL::SimpleMPL::write_gds()':
SimpleMPL.cpp:(.text+0x1364): undefined reference to boost::timer::auto_cpu_timer::auto_cpu_timer(std::string const&)' libOpenMPL_lib.a(SimpleMPL.cpp.o): In function SimpleMPL::SimpleMPL::solve()':
SimpleMPL.cpp:(.text+0xa59e): undefined reference to boost::timer::format(boost::timer::cpu_times const&, short, std::string const&)' SimpleMPL.cpp:(.text+0xa633): undefined reference to boost::timer::format(boost::timer::cpu_times const&, short, std::string const&)'
SimpleMPL.cpp:(.text+0xa7dc): undefined reference to boost::timer::format(boost::timer::cpu_times const&, short, std::string const&)' SimpleMPL.cpp:(.text+0xa968): undefined reference to boost::timer::format(boost::timer::cpu_times const&, short, std::string const&)'
SimpleMPL.cpp:(.text+0xaa03): undefined reference to boost::timer::format(boost::timer::cpu_times const&, short, std::string const&)' libOpenMPL_lib.a(SimpleMPL.cpp.o):SimpleMPL.cpp:(.text+0xaaa6): more undefined references to boost::timer::format(boost::timer::cpu_times const&, short, std::string const&)' follow
collect2: error: ld returned 1 exit status
`
How can I fix the problem?
I have tried to change the boost version from 1.55 to 1.72 and try to install boost in other ways. I have also tried to change the installation path. But these still cannot work.