Multiple inclusion of static libraries

R

rajesh_krec

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
 
J

John Carson

rajesh_krec said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top