C++ Builder IDE >> Dependancies in LIB files

by Chris Durkin » Wed, 08 Oct 2003 12:23:38 GMT

If you are creating a LIB file and you place a object file in it "A",
however "A" depends on file "B".
Will "B" be automaticially included in the LIB?




C++ Builder IDE >> Dependancies in LIB files

by Eelke Klein » Wed, 08 Oct 2003 16:00:38 GMT


> If you are creating a LIB file and you place a object file in it "A",
No, LIB's are just collections of object files they are not linked.

Also when you have a lib containing object file K and object file L and
you link an executable to this lib which only needs object file K then
the resulting executable won't include object file L (unless K needed L
ofcourse).

Eelke




C++ Builder IDE >> Dependancies in LIB files

by Chris Durkin » Wed, 08 Oct 2003 17:15:56 GMT

Not quite what I was asking, I'll ty to explain better.
I have divided my application up into:
- files that deal with subsystem A into Library A;
- files that deal with subsystem B into Library B; etc
but there is a fair degree of interdependance (ie A units call B units and
vise versa).
Will library A contain object files of B, and B contain object files of A?
(I think they do)
Can I divide my system when there is this interdependance?

Chris







Dependancies in LIB files

by Liz Albin » Wed, 08 Oct 2003 17:19:13 GMT





No, not unless you put them there.


You might be better advised to put the common functions in one place,
and thus have 3 libraries

--
liz


Dependancies in LIB files

by Edward Diener » Wed, 08 Oct 2003 20:16:38 GMT




No. Each library is its own set of object files.

If you want the linker to look for object files in library B when it is
linking in a particular object file in library A, or look for object files
in library A when it is linking in a particular object file in library B,
you can add this to the source ( or header ) for the particular object file:

#pragma comment(lib,"SomeLibname.lib") // where SomeLibname is the name of
your other library


Sure, why not.







Similar Threads

1. why vc alwayys links kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

I wonder why the linker is always searching these libraries, and where I 
can switch that off.

I can imagine why kernel32 is linked, but what do I need gdi for in a dos 
app and odbc and so on?

cheers
Ingo

2. LIB : fatal error LNK1181: cannot open input file '..\..\..\..\lib\x86\strmiids.lib'

3. LIB : fatal error LNK1181: cannot open input file '..\..\..\..\lib\x86\strmiids.lib'

4. fatal error LNK1181: cannot open input file '..\..\..\..\lib\x86\strmiids.lib'

5. [Linker Error] Unresolved external '__ExitVCL' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER5\LIB\CP32MTI.LIB|crtlvcl

hi, i just installed BB5 on a windows 2000 machine. On my first 
compile (the program already existed, i wanted to compile it with BB) I got the following message:
[Linker Error] Unresolved external '__ExitVCL' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER5\LIB\CP32MTI.LIB|crtlvcl

I haven't ever seen this before. Does anyone have any idea what causes it? this is a console application project and 'use vcl' was 
NOT checked when i started it. Hence, i don't know why it would even be 
trying to initialize the vcl. 

Can anybody help me resolve this issue? thanks

6. BDS2006: Installing Delphi-Components/LIB-Files, DCU-Files - Borland C++ Builder VCL Components

7. How to work with Header files(.h) and lib files in C

 Hi!all. As part of the course project in the university, students
have been given task to develop a front-end for SMILE( an API written
in C++ for network modelling). Upon extracting the setup, it gives a
collection of " Header files and Lib files" written in c++.

  Now, how do i add them in c# to use the existing api to create a
front-end. I do know that we can include the reference for any .dll
file and use it. But don't know how to use existing header files  and
lib files in c#.

 Can somebody guide me and help me on this issue, if somebody has
worked with C++ header files or done any sort of work on SMILE.

 Would be really thankful personally, and it will be great help for
the students of this course project.

8. lib file name not the output file name