Hi,
#include <iostream>
#include <boost/thread.hpp>
void NewFunc()
{
std::cout << "NewFunc running" << std::endl;
//do something
std::cout << "NewFunc finished" << std::endl;
}
int main(int argc, char* argv[])
{
boost::thread FuncThread(NewFunc);
FuncThread.join();
}
g++ -c -g -MMD -MP -MF build/Debug/GNU-Solaris-x86/main.o.d -o build/Debug/GNU-Solaris-x86/main.o main.cpp
main.cpp: In function `int main(int, char**)':
main.cpp:19: error: `boost' has not been declared
main.cpp:19: error: `thread' undeclared (first use this function)
main.cpp:19: error: (Each undeclared identifier is reported only once for each function it appears in.)
main.cpp:19: error: expected `;' before "FuncThread"
main.cpp:20: error: `FuncThread' undeclared (first use this function)
Any idea why this is failing?
Thanks