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

Got LNK2005: DllMain already defined in error

BertDR
Beginner
1,018 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
961 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


SantoshY_Intel
Moderator
924 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


BertDR
Beginner
906 Views

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

SantoshY_Intel
Moderator
888 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 

 

BertDR
Beginner
855 Views

Hi Santosh,

 

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

 

Regards,

Bert

 

SantoshY_Intel
Moderator
823 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


Reply