g++ and boost linker error on Ubuntu oneiric

前端 未结 1 586
一整个雨季
一整个雨季 2021-01-15 18:41

I am getting the following errors after an upgrade. I cannot figure what is wrong with it. It should work as far as I can see.

$ make 2>&1 | head
g+         


        
1条回答
  •  迷失自我
    2021-01-15 19:34

    The solution involved changing the order of linkage, as per the man page. The thing is that it used to work fine with an older version of g++...

    $ make
    g++ -I/usr/include/boost -MM ./YYY.cc ./main.cc ./myClass.cc > buildfiles.d
    g++ -ansi -O2 -Wall -I/usr/include/boost   -c -o main.o main.cc
    g++ -ansi -O2 -Wall -I/usr/include/boost   -c -o myClass.o myClass.cc
    g++ -o prog -ansi -O2 -Wall -I/usr/include/boost  ./YYY.o ./main.o ./myClass.o -lstdc++ -L/usr/lib -lboost_program_options -lboost_thread 
    

    0 讨论(0)
提交回复
热议问题