Need help linking to boost thread library
uname -a
Linux Dell-Ubuntu 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
I am trying to compile and link a very simple program named "testthread.cpp", merely intended to test my boost installation:
-------
#include <boost/thread.hpp>
#include <iostream>
int main()
{
std::cout << boost::
}
-------
When I compile with the following command:
gcc -o testthread testthread.cpp -lboost_thread
I get the following errors:
/usr/bin/ld: /tmp/ccsW57B3.o: undefined reference to symbol '_ZN5boost6syst
//usr/lib/
collect2: error: ld returned 1 exit status
Boost was installed as follows:
sudo apt-get install libboost-all-dev
What am I doing wrong?
Thanks,
Allan
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Allan W. Macdonald
- Solved:
- Last query:
- Last reply: