Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2007

Tip: Looking for answers? Try searching our database.

Static library contain dynamic library

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sealo - 26 Jun 2007 02:46 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.