Thank you very much! This did the trick. Compiled flawlessly after that.

Incidentally, including "sys/types.h", didn't make a difference.

Edit: I have a new problem though! My game refuses to load in a sound sample which it has always been able to load, it fails to load it then freezes up.

When I look at the allegro.log file it was 153061 lines long!!! That's insane! My game didn't even make it all the way through the initialization! It barely loaded anything. There's definitely some bugs with this release. I would attach the allegro.log but it is over 22megs big! :O (note: I had deleted the allegro.log file before running this so this was a freshly made log)

Edit2: I recompiled with MinGW 4.7.0 + Allegro 5.1.8 (though the version displayed in my console says 5.1.9) and it runs flawlessly. Log file is only 10K lines rather than 156K (and that was with a full load and run and exit). So... dunno.

Gosh Neil, these releases just have trouble with your game. Is there any way you could share your code, perhaps privately? I'm sure I can solve the problem with a bit of effort. As for the log, I'm sure you can zip it up and it'll be a lot smaller. After all, it's all text anyway.

Okay, several issues. I am missing several DLLs, even though I compiled this with the static version of the library. Some I have, some I do not, but requiring a DLL sort of nullifies the whole idea of a static build. So far it has required libvorbisfile-3.dll, libvorbis-0.dll, which I had, it also requires libogg-0.dll which I do not have.

I compile the debug version with the library: allegro_monolith-debug-static

So I definitely am using the right one, and all my code is set to static, always has been, works with past versions of Allegro 5 static builds (all premade builds by the way, like this, not my own versions).

The game fails to load as a result, and then when it goes to exit and shut down the screen, it goes into an endless loop for the following code:

EDIT: Okay, I solved the freezing problem. I had the code to shut down the display before the code which frees up the fonts I loaded. I am not sure why that could cause a problem now and not before, but I moved my code to shut down the screen to the end of my function and it no longer freezes up, so I needed to destroys bitmaps before I destroy the screen I guess.

Still need those DLL requests gone as this IS static. Perhaps I will try compiling a non-static version tomorrow as it is now past 4am... argh. I would like it if there was an up to date release version so I could compile without the allegro.log appearing.

You're using the binaries and compiler I provided, right? I know about 2 dll dependencies, libstdc++-6.dll and libgcc_s_dw2-1.dll. That is because of the way CMake built them. The option to link statically to the CRT is not available yet. SiegeLord recently added an option to the cmake build system to do this, but it doesn't work for MinGW yet. So those two dlls still have to be packaged, even with a static build. Sorry about that.

Now, you said your static build relies on vorbis and ogg dlls? It definitely shouldn't. The examples and demos I built alongside the static libraries all work and they only rely on the two CRT dlls I mentioned above and OpenAL32.dll. I don't have a static version of OpenAL built yet, because the cmake build script they provide does not have a static version.

libogg-0.dll is provided in bin\dlls btw, along with the rest of the dlls.

Sounds like you got bit by the dynamic-load issue for allegro_acodec. By default it tries to dynamically load codecs for its supported formats, you have to clear a flag in CMake (WANT_ACODEC_DYNAMIC_LOAD I think) to disable that.

I think for the future that option should be disabled for static builds. Something to consider.

You can get a fully static build, I have a working one for minisphere (5.1.11 even), the entire game engine is self-contained in a single 2.2mb executable with no dependencies.

Yeah, this was compiled 100% ONLY with what you provided. I have the MinGW you provided in it's own folder along with the Allegro you provided in the same folder. There was no libogg-0.dll in there though... <double checks> I see why I couldn't find it last night. There is a dll folder in your main MinGW folder as well as one inside the bin folder Let me try this again.

I can live with needing dlls though, no big deal, but if some are required it should be mentioned somewhere so people aren't surprised (in that text file about static linking perhaps, for now anyhow).

<time passes>

Okay, I ran it again, this time with libogg-0.dll, libvorbis-0.dll and libvorbisfile-3.dll in the same folder and it ran without problems. I didn't recompile it to use dlls, just included those for now.

I rebuilt the two static libraries with that option disabled. Here they are :

Yay! That worked, many thanks for your work on this.

Edit: New version up, compiled with this, complete with proper installation program (Windows) etc... if you're curious. The game is fully functional, just needs a few things added (multiplayer option etc). Compiled with Code::Blocks, and the MinGW + Allegro supplied in this thread.

Glad it all works now. Just to be clear, did you compile with the official static binaries and observed that they required the ogg etc DLLs? I thought I fixed that... .

Yup, I did. No more DLLs needed. I don't keep my DLLs in my system path anywhere just so I can know what is and is not needed.

The ZIP I linked to is what I compiled with no DLLs and works as is. I got more work done on it today, so far I am quite pleased with this version. I may actually get my game done (actually, I got it done today, just bug testing it now).

I have a problem with ex_dualies.When I run it the resolution changes to 640x480 on both my monitors, but don't came back to the original aspect when I quit.Edit: ex_win_full does the same but only on my main monitor.

I never noticed this until today, because MinGW's bin folder was in my path (it no longer is). But when compiling my game, it now says "libgcc_s_dw2-1.dll is missing", but I statically link it with my game, always have (with "-static" in my linking options, which has always worked with past Allegro libraries, but now this one). All I can assume is that Allegro 5.1.11 has not been statically linked with libgcc_s_dw2-1.dll?

I'm starting to require the inclusion of more and more dlls with this build. I can include this dll if need be, but the static version of this library is definitely broken.

NeilI told you before, that my build of A5.1.11 depends on OpenAL and the CRT dlls. If you need to know which dlls a program is dependent on, use Dependency Walker. It's because the option to build the allegro dll with a static crt isn't available yet through cmake, so even the static versions depend on OpenAL and libgcc_sw2 and libstdc++.