embedding a 3rd party LIB in a DLL
Hi there,
I work on an application, say MyApp.exe.
MyApp.exe links to MyDll.dll through its lib file.
Both MyApp.exe and MyDll.dll rely on a third party static library, ThirdParty.lib.
Is there a way I can embed ThirdParty.lib in MyDll.dll - an avoid having to specify both MyDll.lib and ThirdyParty.lib in the link dependencies of MyApp.exe. I would like to specify only MyDll.lib
Thanks for any help.....
Andy
Re: embedding a 3rd party LIB in a DLL
No. The functions in the static library are added to the exe/dll at link time. You could wrap the functions in your DLL. In other words, in your DLL export functions that you write, that just call the functions in the static library. Then, you exe only depends on your DLL.
Viggy
Re: embedding a 3rd party LIB in a DLL
thanks Viggy, that's not very practical - but I guess there's no other way out
Re: embedding a 3rd party LIB in a DLL
Actually, another thought occured to me. You might be able to combine the libraries into one, using the lib - library manager tool. Though, I've never done this...
Viggy
1 Attachment(s)
Re: embedding a 3rd party LIB in a DLL
Quote:
Originally Posted by
andypandy2
thanks Viggy, that's not very practical - but I guess there's no other way out
Well, your guess is wrong. Here's the sample where you can see how to export function from dll while it's implementation resides in lib.
Re: embedding a 3rd party LIB in a DLL
Oops... left the subject for dead. Thanks for the tip, I'll be looking into it Asap
Re: embedding a 3rd party LIB in a DLL
Igor,
Does this mean I have to type out all the functions in the EXPORTS section of the DEF file ? Is there a "Export All functions" possibility ?
Thanks again
Andy
Re: embedding a 3rd party LIB in a DLL
Yes, it does mean.
Besides, it may also hint you that all the functionality that uses the 3rd party lib should be moved to a single module (dll most likely), and all the other consumers would re-use that one.