Problem creating 64bit executable with glut,VS2008

Hello,
I have so far managed to create with Visual Studio 2008 a 32-bit executable of an OpenGL C code (last code in http://www.glprogramming.com/red/chapter01.html) that uses glut (I work in Windows 7 64 bits).

I installed glut files as follows:
<<<<<
glut.h in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\gl
glut32.lib in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib
glut32.dll in C:\Windows\System32
>>>>>

and I have used the command line instruction cl:
call “C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat”
cl example-opengl.cpp

So far, so good…

I am now trying to create a 64-bit executable.

Based on what I found on the Internet, I tried two installations:
<<<<<
glut.h in C:\Program Files (x86)\Microsoft SDKs\Windows\v5.0\Include\GL
glut32.lib in C:\Program Files (x86)\Microsoft SDKs\Windows\v5.0\Lib
glut32.dll in C:\Windows\SysWOW64
>>>>>
and also:
<<<<<
glut.h in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\GL
glut32.lib in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib
glut32.dll in C:\Windows\SysWOW64
>>>>>

and I try to compile with:
call “C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat”
cl example-opengl.cpp

For both installations, there is an error from the linker:
LINK : fatal error LNK1104: cannot open file ‘glut32.lib’

What is the way to fix this before I tear off all my hair?.. :stuck_out_tongue:

Notice that I am using only a shell, not the IDE of Visual Studio.

Many thanks in advance for your help.
Manuel

You can not build a 64bits program out of 32bits libraries.
Try this instead :
http://www.transmissionzero.co.uk/software/freeglut-devel/

Freeglut is the best GLUT implementation currently.

freeglut works fine indeed.

I must admit I had been awfully confused by some seemingly contradictory information from the Internet.

Thank you so much!
Manuel

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.