Skip to content

undefined reference to `boost::timer' libraries while building #15

@MolyOre

Description

@MolyOre

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions