Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Static compile in windows 7 and code::blocks

This thread is locked; no one can reply to it. rss feed Print
Static compile in windows 7 and code::blocks
mind78
Member #15,802
November 2014

I have successfully followed the guide at: https://wiki.allegro.cc/index.php?title=Building_with_msys2

I am using windows 7 and code::blocks.

However, I find it really annoying to have to supply and keep track of so many dll files every time I compile something and copy them to the executable directory. I would rather compile a static, or possibly, only 1 dll file.

Is there a standard procedure to follow to do a static build under my circumstances?

SiegeLord
Member #7,827
October 2006
avatar

I'm fairly certain that dependencies that come from MSYS2 are always in DLL form. You can grab the dependency package which contains the pre-compiled dependencies in static library form: http://download.gna.org/allegro/allegro-deps/1.5.0/

Note that you'll probably have a bit of trouble getting Allegro to prefer them to the ones installed with MSYS2, so either uninstall the MSYS2 ones, or specify each one manually like is done in the script to build the official binaries:

https://github.com/liballeg/allegro_winpkg/blob/master/universal/build_allegro_msys.sh

Lastly, you can get pre-compiled static Allegro binaries for MSYS2: http://download.gna.org/allegro/allegro-bin/5.2.2/ Pick the ones with 'static' in the name, as those will let you avoid the C++ runtime DLL as well.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

mind78
Member #15,802
November 2014

Thank you. I will try out some of the solutions!

Go to: