View Full Version : eror cant keep learning starter code chapt 02

05-19-2008, 06:49 AM
i start reading and got to the compiling party and after fixing some stuff and i even had to mas around with the glee.h which in it was writing long long instead of long .
any way i fixed that and got a message saying :
LINK : fatal error LNK1104: cannot open file "freeglut_static.lib"
Error executing link.exe.
i need this pretty fast any one have an idea way? visual c++?

Joseph Steel
05-19-2008, 11:47 PM
For a start long long is NOT a long. This is a representation of a 64-bit integer. I would therefore suggest that rather than edit the header file you find another solution.

Have you told the linker where the file freeglut_static.lib is on your machine? You can either specify an absolute path for the file or give a list of additional directories for the linker to search. If you're using VisualStudio look in the Project Settings.

05-21-2008, 08:56 AM
ty for responding but i dont thinck i got what your saying whan i put back the 2 longs thats what is says
--------------------Configuration: simple - Win32 Debug--------------------
e:\sb-allsource\examples\src\shared\glee.h(725) : error C2632: 'long' followed by 'long' is illegal
e:\sb-allsource\examples\src\shared\glee.h(726) : error C2632: 'long' followed by 'long' is illegal
Error executing cl.exe.

simple.exe - 2 error(s), 0 warnin
whan i delet the long it is saying the static_lib problem

this is my program :
(prety simple )
// Simple.cpp
// The Simplest OpenGL program with GLUT
// OpenGL SuperBible, 3rd Edition
// Richard S. Wright Jr.
// rwright@starstonesoftware.com

#include "E:\SB-AllSource\examples\src\shared\gltools.h" // OpenGL toolkit

// Called to draw scene
void RenderScene(void)
// Clear the window with current clearing color

// Flush drawing commands

// Setup the rendering state
void SetupRC(void)
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);

// Main program entry point
int main(int argc, char* argv[])
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA);



return 0;

05-21-2008, 08:58 AM
and this is the section in the code wich makes the problem in glee.h
#ifndef GL_EXT_timer_query
typedef signed long long GLint64EXT;
typedef unsigned long long GLuint64EXT;

05-21-2008, 08:59 AM
What compiler are you using? Maybe it is an old revision that does knot know "long long" yet. Try MinGW or the latest version of MS SDK

05-21-2008, 11:51 PM
well i do believe it is pretty old I'm using visual c++