Allegro 4 + Codeblocks problem
wonsungi

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

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

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

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.

Thread #611484. Printed from Allegro.cc