User forums > Using Code::Blocks

How to change default main file from .c to .cpp in an OpenGL project?

(1/1)

mysteriousmonkey29:
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.

Jenna:
You can try this:
http://forums.codeblocks.org/index.php/topic,12687.msg85887.html#msg85887

Navigation

[0] Message Index

Go to full version