- In Eclipse...
- File > New > Project > C/C++ > C++ Project
- Hello World C++ Project w/ MinGW GCC
- If you didn't see MinGW GCC then uncheck the box "Show project types and ....".
- Name the project and finish.
- Copy the lib and include folders you've been adding things to over to the eclipse_workspace folder and place them next to the project's src folder.
- In Eclipse, right click on the project > Properties > C/C++ Build > Settings
- GCC C++ Compiler > Includes > Include paths (-I)
- Click the button with the green plus sign and add the "workspace" path to your folder "include" that you copied into the project folder.
- MinGW C++ Linker > Libraries.
- Go to Libraries (-l) and add: "glu32", "opengl32", "freeglut".
- These need to be in a proper order to try to keep them in the order I just described, from the top to the bottom (glew32 on top, then glfw, then...).
- Go to Library search path (-L)
- Add the "workspace" path to the "lib" folder you copied into the project folder.
- Click "Apply" and "Ok".
- Take the .dll's you copied into your "bin" folder and copy them into the project's "debug" or "release" folder. I use "debug", and it's what I've confirmed to work, so copy them into the "debug" folder.
- Copy and paste the code here over the hello world code. This will run the spinning cube dude: http://pastebin.com/RfdPESsz
- Right click the project and "Build" (or hit the hammer button up top).
- Right click the project and "Run As" > "Local C/C++ Application".
Setting up the GLFW project
- In Eclipse...
- File > New > Project > C/C++ > C++ Project
- Hello World C++ Project w/ MinGW GCC
- If you didn't see MinGW GCC then uncheck the box "Show project types and ....".
- Name the project and finish.
- Copy the lib and include folders you've been adding things to over to the eclipse_workspace folder and place them next to the project's src folder.
- In Eclipse, right click on the project > Properties > C/C++ Build > Settings
- GCC C++ Compiler > Includes > Include paths (-I)
- Click the button with the green plus sign and add the "workspace" path to your folder "include" that you copied into the project folder.
- MinGW C++ Linker > Libraries.
- Go to Libraries (-l) and add: "glew32", "glfw", "glu32", "opengl32".
- These need to be in a proper order to try to keep them in the order I just described, from the top to the bottom (glew32 on top, then glfw, then...).
- Go to Library search path (-L)
- Add the "workspace" path to the "lib" folder you copied into the project folder.
- Click "Apply" and "Ok".
- Take the .dll's you copied into your "bin" folder and copy them into the project's "debug" or "release" folder. I use "debug", and it's what I've confirmed to work, so copy them into the "debug" folder.
- Copy and paste the code here over the hello world code. This will run the spinning cube dude: http://pastebin.com/yXDzXPYq
- Right click the project and "Build" (or hit the hammer button up top).
- Right click the project and "Run As" > "Local C/C++ Application".
The GLFW project will build fine but for me I have to run it from the project's debug folder. You can of course run it in debug in the editor just fine.
Here is a copy of my project folders. Everything is referenced from within the project workspaces so things should be portable: THE_PROJECTS.
No comments:
Post a Comment