Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
LNK4006 errors in VS.NET caused by setting project dependencies
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Roger Stoller  
View profile  
 More options Dec 18 2003, 5:11 pm
Newsgroups: microsoft.public.vsnet.ide
From: "Roger Stoller" <rstol...@ameritech.net>
Date: Thu, 18 Dec 2003 22:08:18 GMT
Local: Thurs, Dec 18 2003 5:08 pm
Subject: LNK4006 errors in VS.NET caused by setting project dependencies
Hello.

I have run into a wall when trying to use project dependencies.  My project
consists of many libraries which depend on many other libraries.  As an
example, lets say:

bar() is defined in foo.obj

library A depends on library B
library B depends on library C
library D depends on library C
executable E depends on libraries A and D.

Because of the dependencies I checked, VS.NET includes C.lib on the LIB
command line when creating B.LIB, thus including it in C.LIB, etc.  This is
not the bahavior I desire.  I just want C built before B, etc.  The result
is that when I try to link E, VS.NET tries to link C into the the EXE twice
(once comming from A and once from D).  This causes LNK4006 errors that look
something like:

D.lib (foo.obj) : warning LNK4006: "bar() already defined in B.lib
(foo.obj); second definition ignored.

Is there any way to tell VS.NET NOT to include depended-upon libraries on
the LINK and LIB command lines?  VS6.0 dependencies worked fine because it
did not do this.  There seems to be no way to modify the command line either
so that I can remove these added libraries on the LINK or LIB command lines.

Thanks!

- Roger


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tian Min Huang  
View profile  
 More options Dec 19 2003, 8:56 am
Newsgroups: microsoft.public.vsnet.ide
From: timhu...@online.microsoft.com (Tian Min Huang)
Date: Fri, 19 Dec 2003 13:52:57 GMT
Local: Fri, Dec 19 2003 8:52 am
Subject: RE: LNK4006 errors in VS.NET caused by setting project dependencies
Hello Roger,

Thanks for your post.

>> Is there any way to tell VS.NET NOT to include depended-upon libraries

on the LINK and LIB command lines?

When we set a project (say B) depend on another one (say C) in Project
Dependencies, Visual Studio .NET IDE believes that project B consumes
executable code generated by project C and set proper link property. Based
on my experience, there is no option to disable this behavior unless we
break their dependency. I am not quite sure why C need to be built before B
since there is not direct/indirect relationship between them.

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roger Stoller  
View profile  
 More options Dec 19 2003, 5:00 pm
Newsgroups: microsoft.public.vsnet.ide
From: "Roger Stoller" <rstol...@ameritech.net>
Date: Fri, 19 Dec 2003 21:56:41 GMT
Local: Fri, Dec 19 2003 4:56 pm
Subject: Re: LNK4006 errors in VS.NET caused by setting project dependencies
Thanks for your reply.

With VC++ 6.0, dependencies merely specified an order in which to build
projects.  The dependencies we specify are due to certain headers (*.hpp
files) that are publish into a common include-file repository.  In our build
environment, some libs cannot build until previous libs' headers have been
published.  With VS.NET, the code-consumption assumption breaks the build.
I suggest adding some sort of option to change this behavior in your next
update.  By the way, I'm using MS Dev Env 2003 version 7.1.3088.  I have
also found numerous bugs in the C++ compiler for 80x86 (version 13.10.3077).
Are there any updates to the compiler as well?  I can send you a bug list if
you like.

Thank you.

- Roger

"Tian Min Huang" <timhu...@online.microsoft.com> wrote in message
news:sh8iVejxDHA.3532@cpmsftngxa07.phx.gbl...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tian Min Huang  
View profile  
 More options Dec 22 2003, 8:49 am
Newsgroups: microsoft.public.vsnet.ide
From: timhu...@online.microsoft.com (Tian Min Huang)
Date: Mon, 22 Dec 2003 13:47:04 GMT
Local: Mon, Dec 22 2003 8:47 am
Subject: Re: LNK4006 errors in VS.NET caused by setting project dependencies
Hello Roger,

Thanks a lot for your feedback and I will report it to our Developer Team.
In addition, you can send me a bug list so that I can check the status of
them. As you know, there may be a hotfix if a bug is critical.

I look forward to hearing from you.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan  
View profile  
 More options Jan 9 2004, 6:19 pm
Newsgroups: microsoft.public.vsnet.ide
From: "Ryan" <nos...@nospam.com>
Date: Fri, 9 Jan 2004 15:17:38 -0800
Local: Fri, Jan 9 2004 6:17 pm
Subject: LNK4006 errors in VS.NET caused by setting project dependencies
I am having a very simialr problem. The difference that I
am having is that I want the .lib linked in, but it is
not build in the default directory that .NEtapparently
has hard coded. For example.

I have 2 projects A & B.
B depends on A.
A.lib is build into C:\myDir\A.lib
.NET adds \projectDir\A.lib to B's project settings!
Then when it's time to link project B, A.lib is not found
because it is built into a different directory.

Is this configurable?
I have a very large project, and this is a huge slow down
for us.

Thanks,
Ryan

>-----Original Message-----
>Hello.

>I have run into a wall when trying to use project

dependencies.  My project
>consists of many libraries which depend on many other
libraries.  As an
>example, lets say:

>bar() is defined in foo.obj

>library A depends on library B
>library B depends on library C
>library D depends on library C
>executable E depends on libraries A and D.

>Because of the dependencies I checked, VS.NET includes
C.lib on the LIB
>command line when creating B.LIB, thus including it in

C.LIB, etc.  This is
>not the bahavior I desire.  I just want C built before
B, etc.  The result
>is that when I try to link E, VS.NET tries to link C

into the the EXE twice
>(once comming from A and once from D).  This causes

LNK4006 errors that look
>something like:

>D.lib (foo.obj) : warning LNK4006: "bar() already
defined in B.lib
>(foo.obj); second definition ignored.

>Is there any way to tell VS.NET NOT to include depended-
upon libraries on
>the LINK and LIB command lines?  VS6.0 dependencies

worked fine because it
>did not do this.  There seems to be no way to modify the
command line either
>so that I can remove these added libraries on the LINK

or LIB command lines.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google