obenjiro
obenjiro

Reputation: 3750

cairo + openGL + Glut + VS 2010 + Windows 7

I'm pretty dump :) So could anybody help and write step-by-step manual, how to install "cairo", "glut" and use it in VS 2010 project (C++) on Windows 7?

PS: the most fun thing that i managed to do that without any problem in Linux.

Upvotes: 2

Views: 1309

Answers (1)

Ithildin
Ithildin

Reputation: 56

I don't know cairo, but setting up GLUT is rather straightforward.

  1. Download FreeGLUT
  2. Unpack the downloaded archive
  3. Go the directory unpack-dir/freeglut-x.x.x/VisualStudio2008
  4. Open the visual studio project
  5. Rebuild the project for each target (release, debug) you want to create

This should create a DLL file and a lib file with the same name. Now if you want to create a new project that uses GLUT, just configure the project correctly:

  1. Create new project
  2. Create a main C/C++ file (otherwise, you won't be able to set the include settings)
  3. Go to project settings (right click project -> Configuration properties)
  4. C/C++ -> General: add the freeglut include directory to Additional Include Directories
  5. Linker -> General: add the path to the built .lib (freeglut) file under Additional Library Directories
  6. Under Linker (input) settings: add the name of the .lib file under Additional Dependencies

If you follow this setup, you should be able to use GLUT (#include <GL/glut.h>) in your code and it should compile nicely. Not sure how you can also add cairo, but it will probably be a very similar process.

Upvotes: 2

Related Questions