Hello,
I have a test in VS2005 that static library A.lib use the dynamic
library C.dll.
Then a application App use the A.lib.
App-->A.lib-->C.dll
It works. But if I remove the C.dll, the app tell me can not find the
C.dll.
I think because A.lib is a static library, so it should contain the
C.dll in it during the build. But actually, it doesn't.
Is there some method to make A.lib contain C.dll, but do not need to
deliver both?
Ben Voigt [C++ MVP] - 26 Jun 2007 03:02 GMT
> Hello,
> I have a test in VS2005 that static library A.lib use the dynamic
[quoted text clipped - 9 lines]
> Is there some method to make A.lib contain C.dll, but do not need to
> deliver both?
Not unless you have source code for C.dll. A lot of information is stripped
during the linking process (where different functions begin and end, for
instance).
sealo - 26 Jun 2007 03:18 GMT
> > Hello,
> > I have a test in VS2005 that static library A.lib use the dynamic
[quoted text clipped - 13 lines]
> during the linking process (where different functions begin and end, for
> instance).
I have the source of C. So, the only method is to recompile the C into
static lib. Then rebuild A.lib
William DePalo [MVP VC++] - 26 Jun 2007 04:37 GMT
> I have the source of C. So, the only method is to recompile the C into
> static lib. Then rebuild A.lib
Yup.
Regards,
Will
William DePalo [MVP VC++] - 26 Jun 2007 03:04 GMT
> I have a test in VS2005 that static library A.lib use the dynamic
> library C.dll.
[quoted text clipped - 8 lines]
> Is there some method to make A.lib contain C.dll, but do not need to
> deliver both?
No, you can not morph a dynamic load library into a static library. Of
course if you have the source to C you can include it in A and recompile it
into the static library.
Regards,
Will
www.ivrforbeginners.com