Linking Error???

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???

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-:
[b]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???[/b]

No, it’s the linker trying to link a file that it thinks that has been compiled.

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

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 That’s the and.obj VC++ keeps looking for.