'Eclipse'에 해당되는 글 1건

  1. 2015.08.05 eclipse에 openGL 설치하기 by TwoTen

먼저


https://www.opengl.org/resources/libraries/glut/


에 가서


"glutdlls37beta.zip" 을 다운받는다.

압축을 풀면,

glut.dll

glut.h

glut.lib

glut32.dll

glut32.lib

라는 파일을 볼 수 있다.


다른 출처

=========

http://riccardotramma.com/2011/04/setup-eclipse-to-develop-opengl-glut-apps-in-java-cc-on-windows-mac/


Set OpenGL for C++ (Windows)
Before starting, just remember to edit (almost) always the settings for both configuration (Debug and Release) at the same time. This can save some time and problems when switching configuration.
To build OpenGL applications in C/C++ you generally need (at least) gl.h and glu.h headers, glu32 and opengl32 libraries (lib and dll).
Those headers can come with Windows SDK installation and for example you can find them there: “C:Program FilesMicrosoft SDKsWindowsv7.0AIncludeGL” and “C:Program FilesMicrosoft SDKsWindowsv7.0ALib”, while the runtime dlls should already be in the WindowsSystem32 (or equivalent) folder.
You can find the headers in the “C:MinGWincludeGL” folder as well and I have those one set in my environment.
To set the necessary paths open the Project properties, and select “C/C++ General->Paths and Symbols“.
In the “Include tab you can set useful path for headers and in the “Libraries” tab you can do the same for lib files.
To set Includes, select “GNU C/C++” language (if you are building a C++ project) and add all the paths needed.
In my case I have those set:





Remember to set those values for both Debug and Release configurations.

You can do the same for the Libs:


…and Lib Paths (that you generally need if you are using custom libs):



Note that if you installed MiniGW then the libraries files needed to build the solution are already picked up from there. In the specific they are “libglu32.a” and “libopengl32.a” in “C:MinGWlib” in my case. So you have just to tell Eclipse that you want to use them, as we already did just above, and don’t worry about the libraries paths.

When you run it, you will instead need the DLLs, but as already mentioned they will be already in the WindowsSystem32 folder.

Another thing to note is that some settings are available and configurable through different menus… this can be confusing at first, but doing just few experiments can help in acquiring more confidence when touching those settings. One example of this is the setting we just done, the one related to setting headers and libraries folders. In fact, instead of setting them in the way I described, you can set them always using the Project Properties page, but using the “C/C++ Build->Settings” page. The picture shows the Linker Libraries settings in this section (the same set previously through the other menu):

Installing GLUT for C++ (Windows)
If you are serious about doing something with OpenGL, you will probably need to download another piece of software that simplifies the development of a multi-platform window system independent app.
You can find them there: http://www.opengl.org/resources/libraries/glut/
The latest version (quite old as well) is the 3.7, but I worked with the 3.6 and it does the job.
Just grab a version and unzip it a good place. You can use the previously created “C:lib” folder if you prefer.
To build and run your app you need just few files:

  • glut.h
  • glut.lib
  • glut32.lib
  • glut.dll
  • glut32.dll

I suggest to organise them distributing them in good named folders:

Once this is done, just update the headers and libraries paths to use it.
NOTE: Remember to put the DLL into your app executable folder or in a system folder (WindowsSystem32).







Posted by TwoTen
l