yeah is should have been -lopengl32, fingers in wrong spot there.
As far as I know microsoft is trying to kill opengl, so I don’t understand why the community would want to use their compiler? I don’t understand why this is a bad question. And becoming dependent on microsoft is a slippery slope, they don’t make us pay now but what happens when we all become dependent on them? I’ll tell you what will happen, they will make us pay.
This is bad because it’s the old API war that played out 18 years ago and everybody is totally sick of it now. There’s nothing new to be said that hasn’t been said many many times before. It’s also totally untrue - Microsoft were never trying to kill OpenGL; quite the opposite: they desperately wanted to break into the graphics workstation market and needed OpenGL for that.
Ok, thanks for a good response
I installed TDM-GCC and I am getting the same error messages
The reason why you’re getting these errors is because you’ve got a #include dependency either missing or specified in the wrong order. If you look at the glu.h file that the errors are coming from, you’ll see lines that look like the following:
const GLubyte* APIENTRY gluErrorString ( GLenum errCode);
In this case, your compiler would be telling you that (1) it doesn’t know what a GLubyte is, (2) it doesn’t know what APIENTRY means, and (3) it doesn’t know what a GLenum is. This is what Agent D was telling you on the previous page: you just have to identify what these dependencies are, and resolve them.
This, by the way, is absolutely basic “how to use your tools” stuff so as a word of friendly and well-intentioned advice: if your two professors with 60 years of experience don’t know how to resolve this after working on it every day for 3 months, you should be seriously thinking about continuining your education elsewhere.
Thanks, on other gamedev.net people told me to use TDM-GCC because you need to use an up to date compiler, so I am using that now.
So I guess I will not have to work on getting my dependencies correct and in the right order now.
So I am now able to compile from the command line using gcc. The answer to my question is that I need to get the newest version of gcc and use this for my command line:
g++ -IF:\school\csci\opengl\SB5\Src\GLTools\include -IF:\school\csci\opengl\SB5\freeglut-2.6.0\include -Llib -Lglew32 -Lfreeglut Triangle.cpp libglut32.a -lglu32 -lopengl32
I have found that SB creates and uses their own libraries. GLTools.h is one of those libraries. These tools are specifically designed to run on MSVS express 2008. To get the library defined (I am just figuring this our right now), I think you have to do this:
1 Go to freeglut’s site and download the latest version (currently 2.6.0)
- Create a c:/libs directory, and unpack the freeglut package there. You should end up with a directory called c:/libs/freeglut-2.6.0.
3.Run MSYS (c:/MinGW/msys/1.0/msys.bat). You should be in your home directory (denoted by ~ after your user and host in the top line).
4.Type “cd /c/libs/freeglut-2.6.0/src” and press [enter]. The ~ will change to /c/libs/freeglut-2.6.0/src to denote your current working directory.
5.Type “gcc -O2 -c -DFREEGLUT_STATIC *.c -I…/include” and press [enter]. What we are doing here is calling the gcc compiler, instructing it to use O2 optimization, set the flag FREEGLUT_STATIC, and compile every source file in this directory into .o object files, and to look for headers in “…/include”. That means to go down one level (to /c/libs/freeglut-2.6.0) and look for the /include directory there.
6.Type “ar rcs libfreeglut32_static.a *.o” and press enter. To the best of my understanding, ar is the utility that compiles static libraries, archive files (.a). We’re telling it to create “libfreeglut32_static.a” from every object file (.o) we just compiled in the previous step.
7.Create a /lib directory in /c/libs/freeglut-2.6.0. Then cut the library we just created and paste it in this directory. The final location of the freeglut library should be “c:/libs/freeglut-2.6.0/lib/libfreeglut32_static.a”.
I am sorry for the flame bait at the beginning of this post. I have never posted anything to a opengl community before and I didn’t know it was such a big deal to address issues that I thought to be technical. I am just learning about how stuff works in this community and thank you for your patience