How to compile Boost multithreaded program?

后端 未结 1 1702
难免孤独
难免孤独 2020-12-21 09:09

I installed boost library. Everything is going OK without multithreading. How do i compile this test program ?

#include 
#inc         


        
相关标签:
1条回答
  • 2020-12-21 09:51

    You need to link with the Boost thread library as well:

    g++ -I/home/user/boost/include testc.cpp -L/home/user/boost/lib -lboost_thread
    

    (Assuming the libraries are in /home/user/boost/lib.)

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