Is it a problem if I compile an application without TBB that uses a dll that is linked with the TBB libraries? Or is it necessary that all parts of an application is set to use TBB if a single parts needs that?
I don'texpect any problems. If a DLL with TBB has some functions declared as exported any applications could call these functions.
The only difference between an application with integrated TBB functionalityvs. an application that uses a DLLwith TBB functionality is that in the 2nd caseTBB functionality will be loaded by OS loaderin a different address space.
You understand the main idea of aDLL, right? That is,a DLLcould beloaded by an application andthe DLL's functionality ( codes, data, etc )could be shared between different applications.
Answer on the 2nd Question:
In case of template-based libraries it is a common approach to includea template-based librarycompletely. Let's say a template-based library has classes A, B and C, and only class B is used in some application. In that case only codes for the class B will be compiled andused inthe application! Codes for classes A and C won't be included inthe application.It makes theapplication more compact.
I don'tknow if somebody uses an STL library througha DLL,but it is possible.
Thanks for your answer. Yes I understand the main idea of a DLL that is the reason why I use them. I would not recommended using STL over DLL boundaries since you can never be sure that the same version of the STL library is used or that the DLL uses a custom allocator. That might end up with some resource leaks.
Hi Daniel, I agree with you regarding anSTL in a DLL. That breaks amain idea oftemplate based programming.
>>...That might end up with some resource leaks...
Yes, especially when a developer creates an object with 'new' C++ operator and never calls 'delete' C++ operator... :)