PDA

View Full Version : can not run tutorial samples



07-09-2003, 03:33 AM
Hello, I try to work with OpenGL but I can't run the program with the first line (glutInit()). there is an Linker error LNK 2001.

Could it be, that I have wrong files downloaded?

in ..\VC98\include\gl
gl.h 31.07.98 70KB
glu.h 26.07.98 14KB
glut.h 26.07.98 22KB

in ..\VC98\lib linked in Project, Settings, LINK
opengl32.lib 18.09.98 331KB

in WINNT\sytem32
glut32.dll 18.09.98 156KB
glu32.dll 08.05.01 118KB
opengl32.dll 08.05.01 676KB

Can anybody give me a hint to run a tutorial demo program?

thanks ToP

Rog
07-09-2003, 04:52 AM
You will also need to link with:

GLU32.LIB
GLUT32.LIB

Then you'll make more progress ... http://www.opengl.org/discussion_boards/ubb/smile.gif

07-09-2003, 06:46 AM
Thanks for your answert, but it doesn't work.

I hav now files from the same download and date:
gl.h glu.h glut.h
glu32.lib glut32.lib opengl32.lib
glu32.dll glut32.dll opengl32.dll

all lib's are linked in project-settings-link

but it doesn't run

inker-Vorgang läuft...
Test1.obj : error LNK2001: Nichtaufgeloestes externes Symbol _glutInit
Debug/Test1.exe : fatal error LNK1120: 1 unaufgeloeste externe Verweise
Fehler beim Ausführen von link.exe.

Thanks ToP

Rog
07-09-2003, 07:10 AM
Originally posted by student TUD:
Symbol _glutInit

I think that's right! There's no such symbol in GLUT32.DLL (unless I'm misreading the error).

Can you post some code?

07-09-2003, 11:15 PM
Hello,

there is not much code:

#include "stdafx.h"
#include <gl/glut.h>

int main(int argc, char* argv[])
{
glutInit (&argc, argv) ;
return 0;
}

the error is:

Test1.obj : error LNK2001: unsolved external symbol _glutInit
Debug/Test1.exe : fatal error LNK1120: 1 number unresolved externals

the 9 Files are downloaded from http://www.hawksoft.com/download/

all 3 libs are linked in project settings

Thanks for hints ToP

Rog
07-10-2003, 12:57 AM
Those libs are for Mesa 3dfx. Are you sure that's what you want? http://www.opengl.org/discussion_boards/ubb/confused.gif

Also, there's a warning on the site -

"WARNING!! Do not copy opengl32.dll and glu32.dll to your /system or /system32 directories"

If you just want to use the "normal" GLUT, then get a version from (for example) http://www.xmission.com/~nate/glut.html

If you have overwritten your opengl32.dll and glu32.dll with the downloads from Hawksoft, then you will need to restore these from your Windows OS CD.... http://www.opengl.org/discussion_boards/ubb/frown.gif

[This message has been edited by Rog (edited 07-10-2003).]

07-10-2003, 03:32 AM
Ohh, now I have the right files and it works.

Also I have the RED BOOK as a beginners tutorial. (and some sample code)

I hope, I'll do it now, Thanks for all your help http://www.opengl.org/discussion_boards/ubb/smile.gif

ToP