Liebe Leute, ich versuche gerade, ein C++-Programm mithilfe von Boost_Thread (http://boost.org) zu schreiben. Das Paket libboost-thread1.37.0 habe ich per Synaptic installiert.
Das Problem ist, er will die Lib einfach nicht finden!!! Mein Aufruf:
1 2 | cd Code/C g++ -o ~/bin/threadtest threadtest.cpp -lboost_thread |
Er meint darauf:
threadtest.cpp:2:27: Fehler: boost/thread.hpp: No such file or directory threadtest.cpp:3:25: Fehler: boost/bind.hpp: No such file or directory threadtest.cpp: In function »int main()«: threadtest.cpp:8: Fehler: »boost« wurde nicht deklariert threadtest.cpp:8: Fehler: expected `;' before »thrd« threadtest.cpp:9: Fehler: »thrd« wurde in diesem Gültigkeitsbereich nicht definiert
Das Programm:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #import <iostream> #import <boost/thread.hpp> #import <boost/bind.hpp> using namespace std; int main(void) { boost::thread thrd(boost::bind()); return thrd.start(); } int do_something() { for(int i = 0; i < 20; i++) { cout << "ROFL!"; } return 0; } |
Was mache ich falsch?
MfG., Migr