PDA

View Full Version : Linking Error???



lost-
08-05-2002, 07:21 AM
I am trying to compile the source code from the 1st nehe.gamedev.net tutorials in Visual C++ but I get:

Linking...
LINK : fatal error LNK1104: cannot open file "and.obj"
Error executing link.exe.

I have added the name of the htree libraries to the link list, and have put gl.h, glaux.h glu.h in the include/gl dir??

Whats wrong???

nexusone
08-05-2002, 07:58 AM
This looks like an compiler error not an openGL error.

What is happening, the compilter is trying to create or open a file called "and.obj" and the computer will not let it.

Check to see if your hard drive is full?
Check and see if there is already a file called "and.obj" on your computer. You may need to delete it.
Check the path settings in the compiler.


Originally posted by lost-:
I am trying to compile the source code from the 1st nehe.gamedev.net tutorials in Visual C++ but I get:

Linking...
LINK : fatal error LNK1104: cannot open file "and.obj"
Error executing link.exe.

I have added the name of the htree libraries to the link list, and have put gl.h, glaux.h glu.h in the include/gl dir??

Whats wrong???

08-05-2002, 11:28 AM
No, it's the linker trying to link a file that it thinks that has been compiled.

cwc36
08-06-2002, 12:27 AM
Try to include the library files in the vc..
Press Alt+F7
click on Link
Type opengl32.lib glut32.lib glu32.lib glaux.lib
and try to execute it...

if still cann't
try to rebuilt the project...
click on Build..
click on Rebuild all

QuantumNgen
05-23-2003, 08:07 AM
I realize this is centuries after the problem was posted, but here's the exact solution:

If you cut+pasted the list of linker files NeHe suggested in Tutorial 1 you might also have copied over the word "and".

Ex: OpenGL32.lib GLu32.lib [and] GLaux.lib

The [and] shouldn't be there http://192.48.159.181/discussion_boards/ubb/smile.gif That's the and.obj VC++ keeps looking for.