help using codeblocks with TBB
I'm trying to use Intel TBB with codeblocks but it keeps giving me an error. I'm following TBB documentation. Starting code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
#include <iostream>
#include <c:\Users\tom\Desktop\include\tbb/task_scheduler_init.h>
using namespace std;
using namespace tbb;
int main ()
{
task_scheduler_init it;
return 0;
}
|
Which keeps giving me
|
undefined reference to `tbb::task_scheduler_init::initialize(int, unsigned int)'|
|
I've added the libraries as the documentation says and included the header file. Any help would be great.
I downloaded and built tbb. Used above code compiled and linked fine.
Built library with:
|
make compiler=gcc arch=ia32
|
Import library with:
1 2
|
pexports -v tbb.dll > tbb.dll.def
dlltool -d tbb.dll.def -l libtbb.dll.a
|
1 2
|
gcc -c main.cpp
gcc -o main.exe main.o -ltbb.dll
|
EDIT: used plain ol' command prompt with mingw/bin in the path
Last edited on
Topic archived. No new replies allowed.