Community
cancel
Showing results for 
Search instead for 
Did you mean: 
bherd
Beginner
84 Views

Static library missing when compiling TBB with MinGW on Windows 7

Hi,
I would like to use TBB together with a project which is compiled using MinGW on Windows. Therefore I need to compile TBB with MinGW as well. I've downloaded the source package, unpacked it to a separate directory and called
mingw2-make -compiler=gcc -runtime=mingw
The compilation is successful and the DLL files are being placed in the build/windows_ia32_gcc_mingw_debug/release folders. However I can't find any static libraries like tbb.lib or tbb_debug.lib. Just the dynamic libraries were built. But I need the static ones as well, right?
When I'm trying to compile a small sample TBB program using a concurrent_map, I'm getting a bunch of unresolved externals. Therefore I was assuming that I need to link the static libraries (which is also mentioned in the tutorial).
Does anyone have some ideas what I'm doing wrong?
Thank you very much for your help!!
Ben
0 Kudos
3 Replies
84 Views

Hi Ben,

Don't you need to link directly to tbb.dll in MinGW case? -ltbb should work in this case, shouldn't it? tbb does not need import lib when gcc is used.
--Vladimir
bherd
Beginner
84 Views

Hi Vladimir,
thanks a lot for your quick response. You're right - it is working well, when I'm directly linking to tbb.dll. That solved my problem (which wasn't a problem, apparently).
However is there any possibility to achieve static linking? I'm just asking out of curiosity because in some cases it might be beneficial not to have a separate dll.
Regards,
Ben
84 Views

We do not support static version of tbb. You can find a way how to get it on windows using a search on this forum but I'm not sure if it will work correctly.
--Vladimir
Reply