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 / Languages / Managed C++ / April 2006

Tip: Looking for answers? Try searching our database.

Linker error 1104

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Felix - 30 Mar 2006 09:50 GMT
After porting a project from VC6 to VC.NET 2003 I have a very strange
problem generating
link error 1104 for import libraries. I just ported the project and made
some small adaptions so
it fits the new IDE. The project itself links against some import libraries
belonging to dll's I
wrote (these dll's have been ported too, of course).

To keep things simple I only use one import library here. To tell the linker
it should link against
the import library 'ltechexd.lib' I go to the 'project
properties/linker/input' and add it on the line
'additional dependencies'. When I now look at the linker command line it
looks like this:

/OUT:".\Debug/MCSProg.exe" /INCREMENTAL /NOLOGO /DEBUG
/PDB:".\Debug/MCSProg.pdb"
/SUBSYSTEM:WINDOWS /MACHINE:X86 ltechexd.lib "p\ImpLib\ltechexd.lib"

This is wrong; the correct linker command line would be:

/OUT:".\Debug/MCSProg.exe" /INCREMENTAL /NOLOGO /DEBUG
/PDB:".\Debug/MCSProg.pdb"
/SUBSYSTEM:WINDOWS /MACHINE:X86 ltechexd.lib

Somehow "p\ImpLib\ltechexd.lib" creeps in and it is this generating the
linker error 1104 (which is fine
since there is no such thing like "p\ImpLib\ltechexd.lib").
What is this "p\ImpLib\ltechexd.lib" and where does it come from? It is not
even a correct path. All import
libraries are stored at \\jupiter\cpp\implib. This path was also added to
the library paths of VC++ directories.

If I remove the import library from 'project properties/linker/input' and
instead add it to the 'additional options'
of the linker's command line, everything is fine and I get the correct
command line and there are of course
no more linker errors.

Deleting _all_ intermediate files of the project and recreating the import
libraries did not help.

Any Idea what could be wrong with this?
Holger Grund - 03 Apr 2006 15:45 GMT
> 'additional dependencies'. When I now look at the linker command line it
> looks like this:
>
> /OUT:".\Debug/MCSProg.exe" /INCREMENTAL /NOLOGO /DEBUG
> /PDB:".\Debug/MCSProg.pdb"
> /SUBSYSTEM:WINDOWS /MACHINE:X86 ltechexd.lib "p\ImpLib\ltechexd.lib"

[..]
> Somehow "p\ImpLib\ltechexd.lib" creeps in and it is this generating the
> linker error 1104 (which is fine
> since there is no such thing like "p\ImpLib\ltechexd.lib").
> What is this "p\ImpLib\ltechexd.lib" and where does it come from? It is
> not
There's an option in the IDE that automatically links against the import
libraries
generated for projects in the same solution that your project depends on.

If you have a project in the solution that generates ltechexd.lib you should
change the setting under Linker->General->Ignore Import Library to Yes.

Also see "IgnoreImportLibrary property"

> libraries are stored at \\jupiter\cpp\implib. This path was also added to
> the library paths of VC++ directories.
[quoted text clipped - 4 lines]
> command line and there are of course
> no more linker errors.
That's odd. Maybe you have some bad character in the XML markup
of your project file? I have no idea what would cause this.

-hg

Rate this thread:







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.