Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: mysteriousmonkey29 on December 26, 2011, 08:26:48 pm

Title: How to change default main file from .c to .cpp in an OpenGL project?
Post by: mysteriousmonkey29 on December 26, 2011, 08:26:48 pm
I keep trying to create OpenGL projects in code blocks, and the default seems to be a main.c file.  Unfortunately, this means that whenever i try to include iostream, the program does not compile correctly.  The only way around this i have found is to create a GLUT project or console application, and then link the other libraries manually, which takes a long time.  Is there anyway to change the default settings, or otherwise avoid this problem?  I have tried looking throught the setup menu for the new OpenGL project, but there doesn't seem to be the option i'm looking for.
Title: Re: How to change default main file from .c to .cpp in an OpenGL project?
Post by: Jenna on December 26, 2011, 10:27:13 pm
You can try this:
http://forums.codeblocks.org/index.php/topic,12687.msg85887.html#msg85887 (http://forums.codeblocks.org/index.php/topic,12687.msg85887.html#msg85887)