Starting to program with OpenGL.

I can read and actually downloaded that package.
That’s not the problem. Dev-Cpp just isn’t working. glaux.h and it’s library isn’t in, only in older versions, and when you import glaux.h and it’s lib from the older version it gives all weird compiling errors. So you understand, that i need a better compiler… such as MSVC++…
So please just point me to it…
Cheers.
BTW, that conversion isn’t in every lesson, and NeHe explains it in valid VC++ code i believe, else it wouldn’t need a conversion…

Originally posted by MentalSentinel:
Hmm. I’ve done everything like it should be done now. I’ve placed the header files in the good directory, correct library’s everywhere.

Dude, no offense but I dont think you know what you are doing. If you just had downloaded and installed DEV-C++ from the link I gave you. You wouldnt need to copy header files around, they are where they belong.

Originally posted by MentalSentinel:
But still the compiler refuses to work…
I’ve tried all the versions of Dev-C++ about now :stuck_out_tongue:

sigh

Originally posted by MentalSentinel:
And i seem to need MSVC++ for NeHe’s tuts.

The MSVC++ tuts are for surprise the MSVC++ compiler. If you want to use Dev C++ you need the Dev C++ tuts.

Originally posted by MentalSentinel:
Could someone point me directly to the proper version of MSVC++ used in NeHe’s tuts… All i seem to find are updates.

MSVC++ cost money. Downloading it would be theft.

Perhaps it would be ALOT easier if you tell us what exactly you want to do and:

1.) Which compiler (and version) do you want use.
2.) Which operating system do you use.
3.) Which tutorials are you trying to compile.
4.) And what error messages do you get.

I DID download and DID install it and it DID NOT work.
I was trying to compile the Dev-C++ conversion of Lesson01 by NeHe.
I tried it with both that older version and the newest version with the glaux lib of the older version.
Here is a list of errors that i get:

  • [Linker error] undefined reference to `glViewport@16’
  • [Linker error] undefined reference to `glMatrixMode@4’
  • [Linker error] undefined reference to `glLoadIdentity@0’
  • [Linker error] undefined reference to `gluPerspective@32’
  • [Linker error] undefined reference to `glMatrixMode@4’
  • [Linker error] undefined reference to `glLoadIdentity@0’
  • [Linker error] undefined reference to `glShadeModel@4’
  • [Linker error] undefined reference to `glClearColor@16’
  • [Linker error] undefined reference to `glClearDepth@8’
  • [Linker error] undefined reference to `glEnable@4’
  • [Linker error] undefined reference to `glDepthFunc@4’
  • [Linker error] undefined reference to `glHint@8’
  • [Linker error] undefined reference to `glClear@4’
  • [Linker error] undefined reference to `glLoadIdentity@0’
  • [Linker error] undefined reference to `wglMakeCurrent@8’
  • [Linker error] undefined reference to `wglDeleteContext@4’
  • [Linker error] undefined reference to `ChoosePixelFormat@8’
  • [Linker error] undefined reference to `SetPixelFormat@12’
  • [Linker error] undefined reference to `wglCreateContext@4’
  • [Linker error] undefined reference to `wglMakeCurrent@8’
  • [Linker error] undefined reference to `SwapBuffers@4’

And ofcourse i don’t know what i’m doing. That’s why i ask help in the first place.

Ok, i’ve found some tuts for a compiler called .NET or something, is that compiler free?

For your compile errors, the reason is that the compiler don’t find the libraries. Check that you have them in the lib directory of your compiler. If you use dev-c++, the compiler is provided by mingw (minimal gnu for windows) and is gcc. The library directory should be in the mingw directory. You need glu, opengl and wgl libraries. They should be called libglu.a or glu.lib, opengl32.lib or libopengl32.a and i don’t know wgl. If you don’t find them, you can try to search on google opengl95.exe. It contains all that you need for doing opengl (but not contains wgl).
If you have the libraries and it still don’t compile, then configure dev c++ (options menu) to add to its library path the lib directory where are opengl libraries.

I found this page page where it seems that visual c++ can be downloaded (i don’t try). I heard that it is free since the new .net platform. If you can, use it rather than dev c++! It compiles very faster and can save you a lot of time.

Finally, if you can, perhaps should you not use wgl. That limits you to windows and you won’t lose time to use a portable library like glut or SDL (better!).

Hope it can help.
Fabien

Thanks, but that toolkit didn’t inlude the OpenGL libs and Header files…
Is it suposed to be in a Dos environment?
Has anyone ever got OpenGL to work with Dev-C++?

I think you have the include files otherwise you would have had errors before the link step like :“gl.h : file not found”.
Have you looked at lib directory of mingw (in the dev c++ directory if you haven’t installed it separetely)?
There is an opengl package for dev c++. Perhaps you have it. Create a new project in dev-c++. In the wizard’s first page, select the multimedia tab. Perhaps you will see opengl. Otherwise you could find it on the bloodshed site.

Have you read the opengl faq on this site? All libraries and includes files are accessible via this faq in the opengl95.exe that i talked about.

Now that i placed glaux.a in the mingw’s lib directory, it solves the errors! But replaces them for two other… :frowning:

  • [Linker error] undefined reference to `WinMain@16’
  • C:\Dev-Cpp\Makefile.win [Build Error] [Project1.exe] Error 1

I have every .a and every .h file already… so no need to download them anymore…
Anyone know how to fix these two?
Cheers.

EDIT: I FINALLY GOT IT TO WORK!!! THANKS MAN!