Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Allegro 4 + Codeblocks problem

This thread is locked; no one can reply to it. rss feed Print
Allegro 4 + Codeblocks problem
wonsungi
Member #11,799
March 2010
avatar

Can anyone help with this Allegro-related StackExchange question: Full screen blackout using allegro in codeblocks

My guess is it's specific to Code::Blocks (and maybe Windows). I've never used Code::Blocks before...

LennyLen
Member #5,313
December 2004
avatar

This problem is in no way related to Code::Blocks.

As has been mentioned in that article, if you use GFX_AUTODETECT your program will most likely run full screen, so use GFX_AUTODETECT_WINDOWED instead.

With that change made, your second program works exactly as expected for me. So your issue is elsewhere, possibly with your display drivers.

wonsungi
Member #11,799
March 2010
avatar

Well, is there any possibility to edit a source file in Codeblocks, but execute a different program?

This guy is an Allegro/Codeblocks newbie.

Theory:

  1. newbie started Codeblocks project and got his first project to run

  2. newbie adds second file to project, also with its own main() and END_OF_MAIN()

  3. newbie runs project, expecting second file to run, but first file continues to run

LennyLen
Member #5,313
December 2004
avatar

You can't have two main() functions in a C or C++ project. Just copy the contents of the second file and paste it over the first then remove the second one from the project.

Go to: