PDA

View Full Version : trouble running program ...please help.



c_anindya
11-10-2002, 09:57 PM
Hello,

I using this basic program in Opengl


#include <windows.h>
#include <gl\glut.h>

void init(void);
void display(void);

int main(int argc, char** argv)
{
glutInit (&argc, argv) ;
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB) ;
glutInitWindowSize (400, 100) ;
glutInitWindowPosition (100, 100) ;
glutCreateWindow ("First Chapter - Opening an OpenGL Window") ;

init() ;
glutDisplayFunc (display) ;
glutMainLoop () ;
return 0 ;
}

void init(void)
{
glClearColor(1.0, 1.0, 1.0, 0.0) ;
glShadeModel(GL_FLAT) ;
}

void display(void)
{
glClear(GL_COLOR_BUFFER_BIT) ;
glutSwapBuffers() ;
}


1. In VC++ I have changed the settings to add appropriate libs
winmm.lib,opengl32.lib, glu32.lib, glaux.lib ,glut32.lib...but
when I try to run I get error as

"Cant open include file gl\glut.h" what is the problem?

2. This same program when I try to run in Dev-c++ and enter
proper libs too it compiles successfully but gives out
error as "The TEST_001.EXE file is linked to missing export
GLUT32.DLL:_glutCreateMenuWithExit.

what can i do run the program and future programs?

thanks in advance,
anindya

Belgy
11-10-2002, 10:11 PM
You need to add the files glu32.dll and glut32.dll to your system32 directory.

//Belgy

c_anindya
11-11-2002, 12:32 AM
Hello,

I just did what you said me to do.
But the problem remains the same.None of
the compilers is giving any better result.
the erorrs they are producing are same as
above!.what can I do abt it?

thanks in advance,
anindya

jirkamelich
11-12-2002, 09:06 AM
I don't use Visual C++, but I would try anyway to write as far as possible exact direction where is glut32.dll or the file you wrote.

Deiussum
11-12-2002, 09:56 AM
VC++ doesn't come with glut. Do a search on these forums and you will find many, many posts about how to download and install it.

c_anindya
11-12-2002, 10:07 AM
its solved.....i downloaded all those stuffs
4-5 times..but in the ends it was VC that
messed thing up!