Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / February 2006

Tip: Looking for answers? Try searching our database.

Mixed libraries in linker command line

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Frey - 08 Feb 2006 16:54 GMT
We are currently having a problem with the linker settings in a solution
that contains multiple projects (solutions with 24 and 130+ behave the
same).  For example, the following linker command line options appear in a
release build:

/OUT:"..\..\lib\TAO_IORInterceptor.dll" /VERSION:1.4006 /INCREMENTAL:NO
/NOLOGO /LIBPATH:"." /LIBPATH:"..\..\lib" /DLL /DEBUG
/PDB:"..\..\lib/IORInterceptor.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF
/IMPLIB:"..\..\lib\TAO_IORInterceptor.lib" /MACHINE:X86 ACE.lib TAO.lib
TAO_PortableServer.lib TAO_Valuetype.lib TAO_ObjRefTemplate.lib
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
\Tao\1_4a\ACE_wrappers\lib\TAO_Codesetd.lib
\Tao\1_4a\ACE_wrappers\lib\TAO_PortableServerd.lib
\Tao\1_4a\ACE_wrappers\lib\TAO_ObjRefTemplated.lib
\Tao\1_4a\ACE_wrappers\lib\TAOd.lib
\Tao\1_4a\ACE_wrappers\lib\TAO_Valuetyped.lib

As you can see, the TAO*d.lib files are included in addition to their
release counterparts.  The correct link line should end after the standard
libraries (odbc, oleaut, ole, etc).  If we check the Input configuration
(additional dependencies) everything looks correct.

Changing the build configuration on the standard toolbar before loading the
properties of a project results in different "extra" libraries appearing on
the linker command line.

Loading the project file into notepad we can see that the Tao\1_4a* path
does not appear anywhere in the file.  It also does not appear in the main
solution file or anywhere in the Visual Studio options (VC++ directories).

At first we thought this was just a display bug, but when the projects are
built, both libraries are linked in, which causes memory issues in the
running applications.

We have also tried building the solution from command line using devenv
/rebuild but got the same results (not really surprised there though).

Any suggestions would be appreciated.
Chris Slowinski - 08 Feb 2006 17:09 GMT
I should mention that we've seen this problem with both Visual Studio 7.1
and 8.

> We are currently having a problem with the linker settings in a solution
> that contains multiple projects (solutions with 24 and 130+ behave the
[quoted text clipped - 35 lines]
>
> Any suggestions would be appreciated.
Chris Slowinski - 08 Feb 2006 18:32 GMT
A little more information: the problem seems to be caused by setting project
dependencies.  The libraries after the standard Windows ones are added by
the dependencies "manager".  Unfortunately, while the libraries are from the
correct projects, the actual compiled units being included are erroneous
(using Debug versions with Release and vice versa).  The version of the
library that appears is dependent on the Solution Configuration.  For
example, if Release is set, then the Release versions of the dependents will
automatically be inserted (for Release and Debug).

Has anyone seen this before?

Chris

> We are currently having a problem with the linker settings in a solution
> that contains multiple projects (solutions with 24 and 130+ behave the
[quoted text clipped - 35 lines]
>
> Any suggestions would be appreciated.
"Gary Chang[MSFT]" - 09 Feb 2006 06:16 GMT
Hi Chris,

>The version of the library that appears is dependent on
>the Solution Configuration.  For example, if Release is set,
>then the Release versions of the dependents will
>automatically be inserted (for Release and Debug).

This behavior is as expected in VS2003 and VS2005.

Visual Studio IDE is unable to attach the corresponding Debug/Release
version's library according to its dependent project's configuration. The
library project's configuration has no direct configuration relationship to
its dependent project's. It should be determined by the Solution
Configuration.

Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
======================================================
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006.  Please complete a re-registration process by
entering the secure code mmpng2006 when prompted. Once you have entered the
secure code mmpng2006, you will be able to update your profile and access
the partner newsgroups.
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.