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

Slightly OT question about lnk error 1104 in visual studio

P: n/a
I am using the latest version of Visual c++ on windows XP.
I am trying to build a project and get a lnk1104 error regarding a
file of the form .../../ ProjectName.lib No other errors, just this
one.
I've googled this error but not found anything useful at my newbie
level. I understand the issue may be one of including the right
files. I therefore went to Additional Include Directories on the
Property Pages but I would need help working out what I need to do to
verify that the paths there are correct.

Can anyone advise or provide a URL for this problem? Perhaps this
isn't a language question, and I apologise if I'm slightly OT but
this
is a very urgent matter for me so I was keen to pick among the high-
activity newsgroups.

Thank you very much for your help,
Paul Epstein
Mar 2 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Mar 1, 11:52 pm, pauldepst...@att.net wrote:
Can anyone advise or provide a URL for this problem?
http://vcfaq.mvps.org/lang/10.htm

First Google result for LNK1104.
Perhaps this
isn't a language question,
It's not.
and I apologise if I'm slightly OT
You are.
but this
is a very urgent matter for me so I was keen to pick among the high-
activity newsgroups.
I guess I've been there, too. You probably aren't going to hell.
Although from now on you should stick to relevant newsgroups; these
ones are high-activity enough already. In your case, it might be
something like microsoft.public.dotnet.languages.vc or
microsoft.public.vc; but don't quote me on that.
Thank you very much for your help,
That said:

1) Make sure ProjectName.lib actually exists somewhere.

2) Make sure ProjectName.lib is in your library path. If you need a
quick fix, find ProjectName.lib, and specify the absolute path in your
additional library directories as per the instructions in the link
above. For example, if you have "c:\somewhere\ProjectName.lib", add "c:
\somewhere" to your library directories. You could also just specify
the absolute path in the library list; instead of "..\..
\ProjectName.lib", change it to "c:\whatever\ProjectName.lib" -- or
just remove the path entirely, leave it as "ProjectName.lib", make
sure it's in your library path, and VC should find it.

You did not give enough information for a more specific answer. In
general, when you link to .lib files, the linker will search the
library paths you have defined. If you link to "..\a.lib" then it will
look for that relative path in the library paths you have set up, so
if "C:\whatever" is a library path, it will look for "c:\whatever\..
\a.lib", which is just "c:\a.lib". So be aware of that, too. If that
makes sense.

Sorry for the sloppy answer, it's all I can think about right now.
It's getting late.

Also, again, this isn't the place to ask, so I would not get your
hopes up too high.

Jason
Mar 2 '08 #2

P: n/a
On Mar 2, 2:15 am, pauldepst...@att.net wrote:
I did include the library paths explicitly as you
suggested, but the problem was not resolved. I'm aware that you
probably need more info, but my problem is that I don't know what
information to give.
1) What is your global library search path, from:

Tools -Options -Projects & Solutions -VC++ Directories ->
Library Files

2) What is your project library search path (for whatever build
configuration you are using, "Debug" and/or "Release" and/or any
custom ones you have made), from:

Project Properties -Linker -General -Additional Library
Directories

3) What libraries are you explicitly linking to, from:

Project Properties -Linker -Input -Additional Dependencies

4) What is the *exact* error message you are receiving?

5) What is the full path to the existing ProjectName.lib file that you
believe the linker should be finding, but isn't?

LNK1104 means it was looking for a library and did not find it. The
library needs to be in your library search paths. If the library does
not exist, or is not in one of the library paths, then it will not
work, period. Does the library exist? Is it in your search paths?
If you enjoy helping, and have time, we could discuss this via email
or messenger. My email is pauldepstein at yahoo dot com
We can keep it here for now; at least if some other problem is
discovered other people will be able to find it. Also I hate helping
people and do not have much free time. :-P
Re the irrelevant newsgroup complaint, I would say in my defence ...
I don't think that's how it works. :-)

Jason
Mar 2 '08 #3

P: n/a
On Mar 3, 2:30*am, "jason.cipri...@gmail.com"
<jason.cipri...@gmail.comwrote:
On Mar 2, 2:15 am, pauldepst...@att.net wrote:
I did include the library paths explicitly as you
suggested, but the problem was not resolved. *I'm aware that you
probably need more info, but my problem is that I don't know what
information to give.

1) What is your global library search path, from:

* Tools -Options -Projects & Solutions -VC++ Directories ->
Library Files

2) What is your project library search path (for whatever build
configuration you are using, "Debug" and/or "Release" and/or any
custom ones you have made), from:

* Project Properties -Linker -General -Additional Library
Directories

3) What libraries are you explicitly linking to, from:

* Project Properties -Linker -Input -Additional Dependencies

4) What is the *exact* error message you are receiving?

5) What is the full path to the existing ProjectName.lib file that you
believe the linker should be finding, but isn't?

LNK1104 means it was looking for a library and did not find it. The
library needs to be in your library search paths. If the library does
not exist, or is not in one of the library paths, then it will not
work, period. Does the library exist? Is it in your search paths?
If you enjoy helping, and have time, we could discuss this via email
or messenger. *My email is pauldepstein at yahoo dot com

We can keep it here for now; at least if some other problem is
discovered other people will be able to find it. Also I hate helping
people and do not have much free time. :-P
Re the irrelevant newsgroup complaint, I would say in my defence ...

I don't think that's how it works. :-)

Jason
Hi Jason,

Thanks a lot for your input on this issue. I did actually post also
to a more relevant ng microsoft.public.vc.language (I think) but got
no respondents. [Admittedly, even that one was slightly off-topic
because it's not a language issue.] I fully agree that my posting was
a breach of etiquette. I hate doing this but I hate being stuck even
more. My own opinion is that ng etiquette could be changed such that
questions of my type can be posed so long as they are labelled as OT.
In any case, the real breach-of-etiquette problem is the commercial
spam. Fussing about other things is a bit like putting a band-aid on
a cancer (I got that cliche from Chomsky).

I resolved this problem by checking out the .lib files using our
source code control system. I had no idea that my problem was
anything to do with source code control which is why I didn't think to
mention it earlier.
Anyway, problem resolved, so I feel much better. And thanks again for
your help.

Paul Epstein
Mar 3 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.