I have problem with linking and here is
what is reported to me.Compile went OK.
--------------------Configuration: vezba 05 17 gl - Win32 Debug--------------------
Linking…
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol __imp__glFlush@0
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol __imp__glEnd@0
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol __imp__glVertex3f@12
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol __imp__glBegin@4
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol __imp__glColor3f@12
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol __imp__glClear@4
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol __imp__glOrtho@48
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode@4
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol _glutMainLoop@0
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol _glutDisplayFunc@4
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol _glutCreateWindow@4
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol _glutInitWindowPosition@8
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol _glutInitWindowSize@8
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol _glutInitDisplayMode@4
vezba 05 17 gl.obj : error LNK2001: unresolved external symbol _glutInit@8
Debug/vezba 05 17 gl.exe : fatal error LNK1120: 17 unresolved externals
Error executing link.exe.
vezba 05 17 gl.exe - 18 error(s), 0 warning(s)
The kode is not mine, the libreries included are Glut.h and gl.h which I resently downloaded.
yakuza
May 16, 2002, 4:10pm
#2
You need to link opengl32.lib in your project settings.
system
May 16, 2002, 4:34pm
#3
yup, but also link glut32.lib
Libs are included but new problem
is here (who would thought so)
and now it is this:
--------------------Configuration: vezba 05 17 gl - Win32 Debug--------------------
Linking…
LINK : fatal error LNK1104: cannot open file “glut32.lib”
Error executing link.exe.
vezba 05 17 gl.exe - 1 error(s), 0 warning(s)
Maxmagnus
Did you download the glut32.lib file? And did you place it in one of the library search paths?
I think I also have a problem along the same lines, because I’m running a Borland 5.02 compiler on Windows 2000 and it’s telling me it can’t open GL.h or glut.h. I know I have the headers in my include directory. I don’t understand all that jazz about library paths either…can you help?
i don’t know much about borland, but in MSVC, you specify folders to look in for headers and libraries. these folders get searched when you #include a header. the library files you link your program with must be in the folders you have specified. if not, you’ll get linker errors.
b
I have found an answer for my question on another forum.
To make things as simple as possible I have to make 2 points about this problem
The forum I have found answers is not written in English.
There had to do several tings just to prepare compiler:
Some of them are:
Download glut.h glut.dll and glut.lib from this address: http://www.xmission.com/~nate/glut.html
Place glut.h in folder include/Gl/ which already contained gl.h and glu.h
Place glut.dll in my C:/windows/system folder.
Place glut.lib in my lib folder.
I had to add couple of .lib files for linking (opengl32.lib, glu32.lib, and glut32.lib)
and in VC++ that is done in Project -> Settings -> Link
Yeah, downloading the required files usually helps
I had to go through all that a couple weeks ago so I know how you feel!