Skip to main content
Make this more obviously an answer
Source Link
Toby Speight
  • 29.6k
  • 48
  • 70
  • 109

When I ran into samehad this, problem, the cause was the ordering of the libraries. To fix it, I put libboost_system last:

g++ mingw/timer1.o -o mingw/timer1.exe  -L/usr/local/boost_1_61_0/stage/lib \
    -lboost_timer-mgw53-mt-1_61 \
    -lboost_chrono-mgw53-mt-1_61 \
    -lboost_system-mgw53-mt-1_61

This was on mingw with gcc 5.3 and boost 1.61.0 with a simple timer example. I tried both standard and debug library static library and don't solve the problem. However when I put the libboost_system at the end, then it solves the problem:

g++ mingw/timer1.o -o mingw/timer1.exe -L/usr/local/boost_1_61_0/stage/lib -lboost_timer-mgw53-mt-1_61 -lboost_chrono-mgw53-mt-1_61 -lboost_system-mgw53-mt-1_61

I ran into same problem on mingw with gcc 5.3 and boost 1.61.0 with a simple timer example. I tried both standard and debug library static library and don't solve the problem. However when I put the libboost_system at the end, then it solves the problem:

g++ mingw/timer1.o -o mingw/timer1.exe -L/usr/local/boost_1_61_0/stage/lib -lboost_timer-mgw53-mt-1_61 -lboost_chrono-mgw53-mt-1_61 -lboost_system-mgw53-mt-1_61

When I had this, problem, the cause was the ordering of the libraries. To fix it, I put libboost_system last:

g++ mingw/timer1.o -o mingw/timer1.exe  -L/usr/local/boost_1_61_0/stage/lib \
    -lboost_timer-mgw53-mt-1_61 \
    -lboost_chrono-mgw53-mt-1_61 \
    -lboost_system-mgw53-mt-1_61

This was on mingw with gcc 5.3 and boost 1.61.0 with a simple timer example.

Source Link

I ran into same problem on mingw with gcc 5.3 and boost 1.61.0 with a simple timer example. I tried both standard and debug library static library and don't solve the problem. However when I put the libboost_system at the end, then it solves the problem:

g++ mingw/timer1.o -o mingw/timer1.exe -L/usr/local/boost_1_61_0/stage/lib -lboost_timer-mgw53-mt-1_61 -lboost_chrono-mgw53-mt-1_61 -lboost_system-mgw53-mt-1_61