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
How to start an OpenGL project
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Fri Mar 16, 2012 2:21 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
-
- CodeLite Plugin
- Posts: 819
- Joined: Wed Sep 03, 2008 7:26 pm
- Contact:
Re: How to start an OpenGL project
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
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
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Fri Mar 16, 2012 2:21 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: How to start an OpenGL project
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
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
-
- CodeLite Plugin
- Posts: 819
- Joined: Wed Sep 03, 2008 7:26 pm
- Contact:
Re: How to start an OpenGL project
You need to add them: Right-click on (the project) asteroids and choose Import Files from Directory.as you can see, there is no Src folder under my asteroids folder so I can't see any of my source.
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.Running program: /usr/bin/codelite_xterm ' ' '/bin/sh -f /usr/bin/codelite_exec '
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Fri Mar 16, 2012 2:21 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: How to start an OpenGL project
Ok, figured it out. But I have a few more questions. What are the following for: Output File, Intermediate Folder, Working Folder?
thanks,
mike
thanks,
mike
-
- CodeLite Plugin
- Posts: 819
- Joined: Wed Sep 03, 2008 7:26 pm
- Contact:
Re: How to start an OpenGL project
Have a look at http://www.codelite.org/LiteEditor/ProjectSettingsBut I have a few more questions. What are the following for: Output File, Intermediate Folder, Working Folder?
-
- CodeLite Enthusiast
- Posts: 13
- Joined: Fri Mar 16, 2012 2:21 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: How to start an OpenGL project
Cool, thanx Dave, I really appreciate your help.