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

Got LNK2005: DllMain already defined in error

BertDR
Beginner
1,620 Views

Hi,

I'm using TBB via the latest vcpkg. Compiling under VS2019, x64-windows-static debug.
I get the following error
tbb_debug.lib(tbb_main.obj) : error LNK2005: DllMain already defined in tbbmalloc_debug.lib(tbbmalloc.obj)

Any idea how that I can fix this? Now I'm building with /FORCE:MULTIPLE to make it succeed.
Can a program link with both (tbb_debug and tbbmalloc_debug) libs, or should only one lib be used?
I'm using tbb/scalable_allocator.h  and tbb/concurrent_queue.h only.

0 Kudos
6 Replies
SantoshY_Intel
Moderator
1,563 Views

Hi,


Thanks for reaching out to us.


Could you please provide us a sample reproducer code along with the steps to reproduce the issue?

Could you also provide the version of TBB you are using?


Thanks & Regards,

Santosh


0 Kudos
SantoshY_Intel
Moderator
1,526 Views

Hi,


We haven't heard back from you. Could you please provide us a sample reproducer code along with the steps to reproduce the issue? Could you also provide the version of TBB you are using?


Thanks & Regards,

Santosh


0 Kudos
BertDR
Beginner
1,508 Views

Sorry, I'm very busy at the moment. I will look at it later. Merci!

0 Kudos
SantoshY_Intel
Moderator
1,490 Views

Hi,

 

Sure, you can take your own time to get back to us.

 

Whenever it is possible for you to provide a sample reproducer, feel free to post a new question. We would be more than happy to help you there. For the time being, could you please let us know whether we can close this thread? 

 

Thanks & Regards,

Santosh 

 

0 Kudos
BertDR
Beginner
1,457 Views

Hi Santosh,

 

Yes you may close this thread. I will post a new question if I can create a sample reproducer.

 

Regards,

Bert

 

0 Kudos
SantoshY_Intel
Moderator
1,425 Views

Hi,


We are closing this thread for now. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks & Regards,

Santosh


0 Kudos
Reply