Linker Error


J

Joel Whitehouse

Hello All,

I have a Visual C++ 2003 dll solution in a directory called "Antenna
Test Range Control", and when I comile it, I get the error LNK1104:
cannot open file "antenna.obj". When I remove teh spaces in my solution
directory, I get the following errors:

MastController.exp : error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol
[email protected]
MastController.exp : error LNK2001: unresolved external symbol [email protected]


I know this is a linker problem, but I don't know what to do.

Any ideas? Thanks.

-Joel
 
Ad

Advertisements

N

Nishant Sivakumar

Don't remove the spaces - if you do that the path becomes invalid since
there's no such directory.

Put quotes around the full path : e.g. "c:\abc and zyx\lots of spaces in
this folder\a b c d....."
 
J

Joel Whitehouse

Nishant said:
Don't remove the spaces - if you do that the path becomes invalid since
there's no such directory.

Put quotes around the full path : e.g. "c:\abc and zyx\lots of spaces in
this folder\a b c d....."
Ooops - I'm sorry - I should've specified that I renamed the containing
directory to a name with no spaces - I didn't change any of the code in
the project. However, the environment macros *did* change to reflect
the change in $(SolutionPath) and such.

-Joel
 
J

Joel Whitehouse

Okay, I went into the linker options and put double quotes around my
"Additional Dependancies," which brings about the same effects as
putting the project in a path with no spaces, except that I now have a
new problem with "[email protected]"...

Here are the errors that I get:

LINK : error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol
[email protected]
MastController.exp : error LNK2001: unresolved external symbol [email protected]
Debug/MastController.dll : fatal error LNK1120: 9 unresolved externals



What do I do to resolve them?

-Joel
 
Ad

Advertisements

C

Carl Daniel [VC++ MVP]

Joel said:
Okay, I went into the linker options and put double quotes around my
"Additional Dependancies," which brings about the same effects as
putting the project in a path with no spaces, except that I now have a
new problem with "[email protected]"...

Here are the errors that I get:

LINK : error LNK2001: unresolved external symbol
[email protected] MastController.exp : error LNK2001: unresolved
external symbol [email protected] MastController.exp : error LNK2001:
unresolved external symbol [email protected] MastController.exp : error
LNK2001: unresolved external symbol [email protected] MastController.exp :
error LNK2001: unresolved external symbol [email protected]
MastController.exp : error LNK2001: unresolved external symbol
[email protected] MastController.exp : error LNK2001: unresolved external
symbol [email protected] MastController.exp : error LNK2001: unresolved
external symbol [email protected] MastController.exp : error LNK2001:
unresolved external symbol [email protected]
Debug/MastController.dll : fatal error LNK1120: 9 unresolved externals



What do I do to resolve them?
Add /verbose to your linker command line options and study the output
produced. Are the files where you expect those symbols to be defined
actually being included in the link?

Use dumpbin /symbols on the .obj files that should define those symbols - do
they in fact define them?

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

LINKER error 0
Linker errors 2
Linker error 1
Linker error 0
Linker Error 4
Linker error 0
Linker error 3
Linker Error 0

Top