Page 1 of 1
How to start an OpenGL project
Posted: Fri Mar 16, 2012 2:29 am
by mikeglaz
I have a small OpenGL program that runs fine from the command line with a Makefile which includes a bunch of linker options to OpenGL libraries. I tried creating a new Simple Executable (g++) but it doesn't let me use my main.cpp file. If I copy over my main.cpp file after creating the project it doesn't look inside my /usr/include/GL directory. And I don't know how to set the OpenGL libraries.
thanks,
mike
Re: How to start an OpenGL project
Posted: Fri Mar 16, 2012 2:42 pm
by DavidGH
Hi Mike,
If you already have a working makefile, you can tell CL to use this instead of its standard one. Either create a new project using the wizard, and select Others > Custom Makefile; or keep your current project but open the Project Settings, then in Customize > Custom Build tick the box and fill in the appropriate fields.
Regards,
David
Re: How to start an OpenGL project
Posted: Fri Mar 16, 2012 11:15 pm
by mikeglaz
Ok, when i create a test program with Console for Categories and select Simple Executable (g++) it builds me a main.cpp file which looks like this:
When I create my OpenGL asteroids with Others for Categories and select Custom Makefile for Templates I get a workspace which looks like this after I build it:
as you can see, there is no Src folder under my asteroids folder so I can't see any of my source.
Then I go into Workspace->Open Active Project Settings...->Customize I get this window which I don't know what to do with:
Now when I try to run it I get this in my Output View window and nothing shows up in Terminal:
Current working directory: /home/mike/C++/OpenGL/asteroids2
Running program: /usr/bin/codelite_xterm ' ' '/bin/sh -f /usr/bin/codelite_exec '
Program exited with return code: -1
thanks in advance,
mike
Re: How to start an OpenGL project
Posted: Sat Mar 17, 2012 12:13 am
by DavidGH
as you can see, there is no Src folder under my asteroids folder so I can't see any of my source.
You need to add them: Right-click on (the project) asteroids and choose Import Files from Directory.
Running program: /usr/bin/codelite_xterm ' ' '/bin/sh -f /usr/bin/codelite_exec '
You haven't told it about the executable. In Project Settings > General, fill in the important fields e.g. Intermediate folder, Program and Working folder.
Re: How to start an OpenGL project
Posted: Sat Mar 17, 2012 1:17 am
by mikeglaz
Ok, figured it out. But I have a few more questions. What are the following for: Output File, Intermediate Folder, Working Folder?
thanks,
mike
Re: How to start an OpenGL project
Posted: Sat Mar 17, 2012 1:26 am
by DavidGH
But I have a few more questions. What are the following for: Output File, Intermediate Folder, Working Folder?
Have a look at
http://www.codelite.org/LiteEditor/ProjectSettings
Re: How to start an OpenGL project
Posted: Sat Mar 17, 2012 3:48 am
by mikeglaz
Cool, thanx Dave, I really appreciate your help.