Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

Release linker error LNK2001

fanaticlatic
Beginner
152 Views
hi folks,

I am getting the following error only when building as release, when building for debug the program runs fine:

error LNK2001: unresolved external symbol @__TBB_machine_trylockbyte@4


Any help or ideas how i can solve this would be appreciated,

Cheers,

Mark.
0 Kudos
2 Replies
fanaticlatic
Beginner
152 Views

Fixed!

The problem for anyone with a similar issue in the future was that I had set the calling convention to __fastcall rather than __ccall. Seems a bit awkward if one function forces you to the __ccall convention. Any way around it or a reason for it anyone know?

Anton_Pegushin
New Contributor II
152 Views
Quoting - fanaticlatic

Fixed!

The problem for anyone with a similar issue in the future was that I had set the calling convention to __fastcall rather than __ccall. Seems a bit awkward if one function forces you to the __ccall convention. Any way around it or a reason for it anyone know?

Hello, this problem has been fixed in the library starting with "20080825" open-source developers' build and TBB 2.1 Update 1 commercial-aligned build. If you update your version of TBB, you'll be able to compile your product with __fastcall as a default calling convention.
Reply