473,405 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Static library contain dynamic library

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?

Jun 26 '07 #1
4 1957
"sealo" <se*****@gmail.comwrote in message
news:11**********************@o11g2000prd.googlegr oups.com...
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?
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
Jun 26 '07 #2

"sealo" <se*****@gmail.comwrote in message
news:11**********************@o11g2000prd.googlegr oups.com...
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?
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).

Jun 26 '07 #3
On Jun 26, 10:02 am, "Ben Voigt [C++ MVP]" <r...@nospam.nospamwrote:
"sealo" <seah...@gmail.comwrote in message

news:11**********************@o11g2000prd.googlegr oups.com...
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?

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).
I have the source of C. So, the only method is to recompile the C into
static lib. Then rebuild A.lib

Jun 26 '07 #4
"sealo" <se*****@gmail.comwrote in message
news:11**********************@z28g2000prd.googlegr oups.com...
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
Jun 26 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: jr | last post by:
I am working in VC++ so this may be microsoft specific though I don't think so. Excuse me if it is. Assuming it isn't, can someone generally explain the purpose of having both - is it purely a...
1
by: Eduardo Suárez | last post by:
Hi, i have tried to understand how static variables work on a dynamic library, but there's a point i can't see. * Is the data segment (where static variables live, please confirm) copied for...
8
by: Peter B. Steiger | last post by:
The latest project in my ongoing quest to evolve my brain from Pascal to C is a simple word game that involves stringing together random lists of words. In the Pascal version the whole array was...
3
by: Joel Barsotti | last post by:
What I mean here is that I have to build an HTML interface for a CD catalouge. All the contents for this catalouge are in a DB right now for the current ..net website. Since the CD catalouge...
5
by: info | last post by:
Hi! Please be patient with a newbie... I use DevC++. I've found and compiled succefully various openGL examples. Before build the application, I link the project with static libs, like, in...
14
by: Shimon Sim | last post by:
I have a static variable defined something like this private static Dictionary<string, string> roles = new Dictionary<string,string>(); Can I safely assume that it will be live for the live of...
20
by: JohnQ | last post by:
The way I understand the startup of a C++ program is: A.) The stuff that happens before the entry point. B.) The stuff that happens between the entry point and the calling of main(). C.)...
6
by: Even | last post by:
Hi all, As far as I know, relative address will be assigned by program at link time.Right? Ok, here we go. So if we use a static library, it will give the program an relative address(i mean...
6
by: =?ISO-8859-1?Q?Tim_B=FCthe?= | last post by:
Hi, we are building a Java webapplication using JSF, running on websphere, querying a DB2 9 on Suse Enterprise 10. The app uses JDBC and PreparedStatements only (aka dynamic SQL). Every night,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.