How can I use openGL on Windows using Eclipse

I recently try to learn coding in openGL, but I dont know how get my IDE eclipse to work with openGL. Help please…THank

Use a real IDE? :wink:

Your question isn’t specific enough. Are you trying to program in Java (the typical use of Eclipse) or some other language?

ohhhh, I plan on programming in C++. I think I can get Eclipse to program in C++ but, how can I implement openGL library

I think I can get Eclipse to program in C++ but, how can I implement openGL library
I’m pretty sure “implement” is not the word you’re looking for.

When you are able to get Eclipse’s C++ extensions up and running (and you shouldn’t even bother dealing with GL until you can compile and run C++ code in your IDE), you should download the NeHe basecode, then get that compiling.

look for the CDT plugin (search web, e.g. google “cdt eclipse”) for creating C/C++ applications with Eclipse.

I went through this recently, so it’s fresh. Eclipse is actually quite nice for C++ development (especially for refactoring, though the code completion isn’t as good as VS2005).

I hope I’m not forgetting a step.

  1. Install MinGW and/or MSYS (preferably not cygwin, though it would work).
  2. Install Eclipse. I recall some setup to tell it where the compiler directories are.
  3. Install CDT plugin. There may be some auto-updates to check.
  4. Install FreeGLUT (my suggestion) source or binary. (build if needed).
  5. Use a simple FreeGLUT example to help setup include paths, link paths and lib names (you will need to link with your copy of FreeGLUT and the system copy of OpenGL32 and GLU32 at a minimum).

You can easily use Eclipses “managed make” feature to build everything in a directory without dealing with make files. The main thing to set up are the paths and libraries, which are easy once you know how, and hard if you don’t. :slight_smile:

SDL would also work instead of FreeGLUT, as would a number of other options. Pick any of those and use their examples to help you verify your include and link paths as correct.

Once you get the example running, you can safely gut it and keep the working setup, or slowly change it into your desired app, or even switch to a different helper library or none at all.

It’s the easiest/safest way to get up and running quickly–and it’s why the examples are there.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.