473,498 Members | 1,833 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple inclusion of static libraries

Hello Everybody,

I'm using Microsoft Visual Studio .NET 2003 (with Vc7 compiler)

I have some 15 projects each of which generate a static library when i
build the solution in release mode.

The solution also contains a project which includes all the above
generated static libraries.I have set all the above projects as
dependent projects in the 'Project Dependencies' option.

So whenever i build this main project(which also generates a static
library) i get lots of warnings of multiple inlcusion of the above 15
static libraries.

I have specified all the names of the staic libraries in the
'Addidional Dependencies' option and specified their paths in the
'Additional Library Directories' option.

I think this is required and it worked fine in my system.

Then, as per Murphy's law this gave a lots of warnings at the client
side:-(

Then when i built the same workspace in 5 systems (2 of them gave me
those warnings).

I'm not able to understand is this related to some default setting in
Visual Studio .net 2003 which is there on my system and not on others
because of which i'm not getting any warnings.

After some trial and error i found that if i don't inlcude the names of
the static libraries in the 'Additional Dependencies' option but
specify their paths in the 'Additional Library Directories'
option........it works fine in all systems and hopefully it should work
on the client side too.

Could u plz tell me how to overcome this problem.

One more strange thing i observed is that in the corresponding 'Command
Line' option i see that the all the library paths are included by
/LIBPATH: option and at the end all the libraries also also getting
inlcuded without specifying them in the 'Additional Dependencies'
option.

Is it that when we build a project in release mode all the libraries of
dependent projects are inlcuded automatically in the build by just
specifying their path or what i feel that we should specify their names
also in the 'Additional Dependencies' option.

In the systems which are generating the warnings this is happening :
once the libraries are getting inlcluded because we have specified them
in the 'Additional Dependencies' option and second time they are
getting inlcluded automatically while building the main project
resulting in the warning.

How can i resolve this????????

Thanks in Advance
Rajesh

Oct 23 '05 #1
1 2518
"rajesh_krec" <ra***********@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com
Hello Everybody,

I'm using Microsoft Visual Studio .NET 2003 (with Vc7 compiler)

I have some 15 projects each of which generate a static library when i
build the solution in release mode.

The solution also contains a project which includes all the above
generated static libraries.I have set all the above projects as
dependent projects in the 'Project Dependencies' option.

So whenever i build this main project(which also generates a static
library) i get lots of warnings of multiple inlcusion of the above 15
static libraries.


[snip]

microsoft.public.vc.ide_general

would seem like a good place to ask this question.

--
John Carson
Oct 23 '05 #2

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

Similar topics

14
1738
by: Fritz Foetzl | last post by:
I'm flummoxed. I'm a veteran C++ programmer from the Unix/Linux camp, trying to learn Visual C++. I'm trying to build a project in which I need to include one header in a couple of different files,...
1
1099
by: Bruno van Dooren | last post by:
Hi, i am using a third party static library (.lib) that wraps a class interface around an old C-style dll. in the static library they use the STL for some stuff i don't know about. in my own...
6
5170
by: techBoy | last post by:
I am looking for a tool that can scan my soyrce code and check if a header file gets included more then once in a sequece of compiled code. Can some one guide me to such a tool !!
60
4862
by: Shawnk | last post by:
Some Sr. colleges and I have had an on going discussion relative to when and if C# will ever support 'true' multiple inheritance. Relevant to this, I wanted to query the C# community (the...
11
22528
by: lars.uffmann | last post by:
Easily described problem: Using g++ version 3.3.5 under suse 9.3, bla.h: ----------- #ifndef myTEST #define myTEST ZFSInt test; #endif
6
2603
by: Richard | last post by:
1. Are there any problems with having, for instance, POSIX's "open" function #defined more than once. In my case, these would be in different static libraries: #ifdef __cplusplus extern "C" {...
10
2789
by: zfareed | last post by:
Similar problem to the previous post. I have created a project with about 7 files including 3 header files and 3 implementation files. I am getting a multiple definition error when compiling for...
1
1099
by: RajinCodingForum | last post by:
I have some idea but i am puzzled. As i understand, file inclusion problems like x includes y and y in turn includes x etc. can be avoided by #ifdef preprocessor checks. Can you please explain with...
9
1712
by: ramsatishv | last post by:
Hi, If I include a ".h" file for multiple times, will it increase my program size?? Regards Ram.
0
7004
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
7167
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7208
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
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5464
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
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1423
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
657
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
292
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.