Compiling a single dll from several .lib
-
Hi, I am trying to compile a single dll from several static library projects in VS2005. However as it seems the compiler does not link the .lib libraries to the dll unless they are referenced in the dynamic library project. Is there any way (linker flag?) that I can aggregate several .libs in a dll file without having to reference their classes/functions/vars? Thanks, Themis
-
Hi, I am trying to compile a single dll from several static library projects in VS2005. However as it seems the compiler does not link the .lib libraries to the dll unless they are referenced in the dynamic library project. Is there any way (linker flag?) that I can aggregate several .libs in a dll file without having to reference their classes/functions/vars? Thanks, Themis
Themis wrote:
Is there any way (linker flag?) that I can aggregate several .libs in a dll file without having to reference their classes/functions/vars?
if you're not referencing them, why do you want them included in your DLL ??
image processing toolkits | batch image processing | blogging
-
Themis wrote:
Is there any way (linker flag?) that I can aggregate several .libs in a dll file without having to reference their classes/functions/vars?
if you're not referencing them, why do you want them included in your DLL ??
image processing toolkits | batch image processing | blogging
to aggregate them in a single "super-DLL" ?
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
to aggregate them in a single "super-DLL" ?
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
Yes I want to create a super-DLL that others (apps or dll) can link and refer to its included objects. However I don't want to merge the several .lib projects into one .dll project to generate my dynamic library as my .libs do not match conceptually, hence I prefer to have them separate in the Solution Explorer. Think of a large base dll with several support projects, like networking, serialization, utilities etc. all merged in a single project_base.dll. Cheers, Themis
-
Yes I want to create a super-DLL that others (apps or dll) can link and refer to its included objects. However I don't want to merge the several .lib projects into one .dll project to generate my dynamic library as my .libs do not match conceptually, hence I prefer to have them separate in the Solution Explorer. Think of a large base dll with several support projects, like networking, serialization, utilities etc. all merged in a single project_base.dll. Cheers, Themis
add your .LIBs to the Additional Dependencies field in the Linker/Input propoerty page. then you will need to explicitly export all of the functions and variables from the various .LIBs, from the DLL.
image processing toolkits | batch image processing | blogging
-
add your .LIBs to the Additional Dependencies field in the Linker/Input propoerty page. then you will need to explicitly export all of the functions and variables from the various .LIBs, from the DLL.
image processing toolkits | batch image processing | blogging
I have already added the dependencies in the dll properties. However I am not sure what you mean when you say "you will need to explicitly export all of the functions and variables from the various .LIBs, from the DLL". I export symbols (classes/functions) using dllexport in each project. Do you mean that I have to do anything more in the dll project? The fact is that without referencing a class from the dll project it will not be linked by the linker to the target dll. I am wondering if I can bypass this linker "optimization" and make the linker unconditionally add a class' code in the dll. Cheers, Themis