I've made a small game in Allegro, but every time I run the .exe file it opens both the allegro window for the graphics but also a command line window even though I don't have anything that prints to it.
It's kind ugly to have the cmd window next to the game window, so I wonder is there any way to not show it?
This really isn't specific to Allegro. The behavior is dependent on your compiler's linker settings.
Under gcc it is:
For MSVC:
If you use an IDE, look somewhere under the linker settings. It may also be referred to as something like "console" vs "windows (or GUI) application." You'll want the latter.