I've extracted the sources from the zip file at the website and put them in Code::Blocks' 'include' folder, but even then it cannot compile the provided 'hello.cpp' example.
(For reference:)
#include <iostream>
#include <tinythread.h>
using namespace std;
using namespace tthread;
// This is the child thread function
void HelloThread(void * aArg)
{
cout << "Hello world!" << endl;
}
// This is the main program (i.e. the main thread)
int main()
{
// Start the child thread
thread t(HelloThread, 0);
// Wait for the thread to finish
t.join();
}
And these are the following errors:
|41|undefined reference to `tthread::thread::thread(void (*)(void*), void*)'|
|44|undefined reference to `tthread::thread::join()'|
|44|undefined reference to `tthread::thread::~thread()'|
|44|undefined reference to `tthread::thread::~thread()'|
The same thing happens with wxDev-C++. Am I missing something; like, do I need to build the libraries or anything? If so, how?