By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,137 Members | 2,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,137 IT Pros & Developers. It's quick & easy.

Linker error 1104

P: n/a
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?
Mar 30 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
> '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.

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.

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
Apr 3 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.