PLEASE take a moment and look at the "Please Read" thread, in particular
the section on the Basic 3. Contained in the compile log for example is
information telling us exactly what was REALLY linked. While telling us
what you did provides context that can be useful, information about what
the compiler actually DID is far more important.
The section on geting started with Glut tells you what to get, where to
get it, and where to put it. This is important, because an inconsistent
set of headers/libraries and dll's can lead to issues. It also gives an
example, and tells you, step by step, how to compile it.
You really need to look at those sections of the Please Read thread.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Wayne, followed your instructions all seems to be fine.
Now have an extra option in New Project > Multimedia Section called GLUT
Select this and away we go!
I’ll try to do better next time, must be the Pattaya nights.
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Some people react badly when I say they need to check something out in the
"Please Read" thread - think I am lazy or something, but there really is a
lot of experience of users in there that can help.
There are a lot of ways to do this stuff wrong, and, trust me, I have sampled
a lot of the wrong ways, with a bias towards those having additional stupidity
involved. When I get it right, I try to write it up to give something to the
community.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Windows XP
Dev-C++ 4.9.9.2
Downloaded and installed “glut”
Compiling example from “OpenGL Programming Guide”
include <gl/gl.h>
include <gl/glut.h>
Linker errors as follows :-
C:\Dev-Cpp\MyDev\OpenGL\mainGL.o(.text+0x188) In function
main': [Linker error] undefined reference to
glutInit'[Linker error] undefined reference to
glutInitDisplayMode' [Linker error] undefined reference to
glutInitWindowSize'[Linker error] undefined reference to
glutInitWindowPosition' [Linker error] undefined reference to
glutCreateWindow'[Linker error] undefined reference to
glutDisplayFunc' [Linker error] undefined reference to
glutMainLoop'C:\Dev-Cpp\MyDev\OpenGL\mainGL.o(.text+0x188) ld returned 1 exit status
C:\Dev-Cpp\MyDev\OpenGL\Makefile.win [Build Error] [Project1.exe] Error 1
Project Options - Parameters - Linker reads -
-lopengl32
-glut32
What have I overlooked ?
Robert
Did you add the libraries in your project?
You do not add libraries to your project, you link them.
Did you read the section in the "Please Read Before Posting a Question" thread on
"Getting Started with Glut"? I think that will get you up and going.
In addition, please read the section in there on the "Basic 3" - that is a better
way than excerpting the information as you have done.
Wayne
Thankyou for your reply.
Yes, I've added glut32.a and glut.a found in the lib directory.
Just in case I'm mistaken :-
Project Options >
Parameters >
Linker >
add library or object
Now reads :
-lopengl32 -lglu32
-glut32 -glut
Robert
Thankyou for your reply.
Yes, I've added glut32.a and glut.a found in the lib directory.
Just in case I'm mistaken :-
Project Options >
Parameters >
Linker >
add library or object button
it now contains:
-lopengl32
-lglut32 -lglut
Robert
Robert,
PLEASE take a moment and look at the "Please Read" thread, in particular
the section on the Basic 3. Contained in the compile log for example is
information telling us exactly what was REALLY linked. While telling us
what you did provides context that can be useful, information about what
the compiler actually DID is far more important.
The section on geting started with Glut tells you what to get, where to
get it, and where to put it. This is important, because an inconsistent
set of headers/libraries and dll's can lead to issues. It also gives an
example, and tells you, step by step, how to compile it.
You really need to look at those sections of the Please Read thread.
Wayne
Thanks Wayne, followed your instructions all seems to be fine.
Now have an extra option in New Project > Multimedia Section called GLUT
Select this and away we go!
I’ll try to do better next time, must be the Pattaya nights.
Robert
Great! Glad to hear you are up and going.
Some people react badly when I say they need to check something out in the
"Please Read" thread - think I am lazy or something, but there really is a
lot of experience of users in there that can help.
There are a lot of ways to do this stuff wrong, and, trust me, I have sampled
a lot of the wrong ways, with a bias towards those having additional stupidity
involved. When I get it right, I try to write it up to give something to the
community.
Wayne