![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
problems setting up allegro - Codeblocks/Mingw |
gibbons1
Member #15,600
May 2014
|
I've been trying to get back into some game dev using allegro recently, but every time I try to get my development environment set up I keep running into various problems and I give up for another week. In the past I have had zero problems setting it up and I have no idea whats changed. Hopefully someone can help me with this. As there are no allegro binaries available for the latest mingw version, I have compiled my own using the guide from the Wiki - http://wiki.allegro.cc/index.php?title=Install_Allegro5_From_Git. This more or less worked correctly. There was one error in the compilation process and it crashed at 26%. I managed to get around this problem using the information in this thread - https://www.allegro.cc/forums/thread/613186. I then set up my codeblocks project (in terms of linking etc) as described by this article on the wiki - http://wiki.allegro.cc/index.php?title=Windows,_Code::Blocks_and_Allegro_5. However, trying to compile a simple test program resulted in errors in io.h due to off64_t being undefined. A quick google suggested that renaming the instances of off64_t to _off64_t should fix the problem. This allowed me to get past the initial errors but ended up turning up more errors as shown below. It seems likely that the problems are related, given that they both talk about this off_t variable. c:\mingw\include\allegro5\file.h|33|error: expected identifier before '*' token| At this point googling the problem is no longer helping and I'm completely stuck. This is really frustrating for me as I've had a few weeks off work and was really hoping to get some dev work done but I've been unable to get allegro working. Does anyone have any idea what I'm doing wrong? Some additional information - I'm running the latest version of mingw (I believe 4.8.1) with codeblocks on a 64 bit windows 7 system. |
Dizzy Egg
Member #10,824
March 2009
![]() |
gibbons1 said: I've been trying to get back into some game dev using allegro recently, but every time I try to get my development environment set up I keep running into various problems and I give up for another week.
Quote: As there are no allegro binaries available for the latest mingw version ...ummm....ok, why don't you just follow this to the letter (the link you already posted!!!): Quote: as described by this article on the wiki.. That article has links to binaries, and of you follow it to the letter everything should work fine. Took me 10 minutes to get up and running!
---------------------------------------------------- |
gibbons1
Member #15,600
May 2014
|
Hmm maybe I'm slow - but the wiki links the allegro.cc download page for the binaries. That page only contains binaries for mingw 4.7.X and lower. Not the latest version 4.8.X? That makes them incompatible, no? Or am I missing something? Side note; I linked to the wrong wiki article in the first post. I actually used this one http://wiki.allegro.cc/index.php?title=Building_Allegro_5.1_%28rev_15032%29_Windows_7 to build allegro. |
Dizzy Egg
Member #10,824
March 2009
![]() |
Use your original link, the one I referenced; use the seperate MingW library (don't be to anal on versions right now, and always get up, always get up!) and follow it TO THE LETTER, including order of libraries from top to bottom, additional linker options etc etc....you can't fail! Not with Windows 7! [EDIT] If you do all that and something goes wrong, let me know and I'll work harder to help you get setup and producing; once it's setup your laughing, cos you can create a template and bang, start getting those ideas out!
---------------------------------------------------- |
gibbons1
Member #15,600
May 2014
|
OK. I was under the impression that libraries needed to be built with the same version of mingw as the final project was compiled in for compatibility. I had tried the 4.7.X binaries originally but also ran into problems which I assumed was from the version number. I've just given it another go using the 4.7.X binaries and unfortunately I have a very similar problem. I still get the error regarding off64_t, and renaming this as _off64_t still works as a get around. Once I get by that bit I get the following error messages. ||=== Build: Debug in b (compiler: GNU GCC Compiler) ===| To the best of my knowledge I have followed the guide to the letter (I've done this dozens of times in the past). This is a screenshot of what my linker settings look like http://imgur.com/v8jWuRK. And I have set up the search directories to the allegro/include folder. I'm obviously missing something really minor as no one else seems to be having these issues but I'm completely blind to it at this point. Any suggestions? And thanks for the help - much appreciated. |
Dizzy Egg
Member #10,824
March 2009
![]() |
Try making them look like this: {"name":"608689","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/9\/290a4ed1ed4d5d8cc70aad1fcc8bb313.png","w":1321,"h":940,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/9\/290a4ed1ed4d5d8cc70aad1fcc8bb313"}
---------------------------------------------------- |
gibbons1
Member #15,600
May 2014
|
OK. So only change was to move libvorbis and libvorbisfile to just before zlib? Unfortunately, with that change the exact same errors occur |
Dizzy Egg
Member #10,824
March 2009
![]() |
Ok, set your toolchain options like this: {"name":"608690","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/6\/76acd6421e085dc8d831c09fe67483e2.png","w":771,"h":777,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/6\/76acd6421e085dc8d831c09fe67483e2"}
---------------------------------------------------- |
gibbons1
Member #15,600
May 2014
|
Just took a look and mine is (more or less) identical - http://imgur.com/oGtgwQx. |
Dizzy Egg
Member #10,824
March 2009
![]() |
What are you including (header) in your test program, just allegro.h?
---------------------------------------------------- |
gibbons1
Member #15,600
May 2014
|
yep. This is the 'test' program I'm trying to compile. #include <allegro5\allegro.h> int main() [EDIT] and just to add, my allegro headers/libraries are installed to c:/allegro and I have added the headers with "..\..\..\..\allegro\include" in the search directories section. |
Dizzy Egg
Member #10,824
March 2009
![]() |
Are you using the libs and MingW from the link we referenced earlier?? <edit> and did you set your path environment stuff?
---------------------------------------------------- |
gibbons1
Member #15,600
May 2014
|
Yes. The binaries from the allegro.cc download page for MingW version 4.7. [EDIT] just in case there is some ambiguity. I downloaded them from this link http://cdn.allegro.cc/file/library/allegro/5.0.10/allegro-5.0.10-mingw-4.7.0.zip [EDIT2] Oh and yes c:/mingw/bin is added to the environmental variables. |
Dizzy Egg
Member #10,824
March 2009
![]() |
Hmmm....are you sure it's using the headers from c:\allegro\include, not c:\mingw\include\allegro????
---------------------------------------------------- |
gibbons1
Member #15,600
May 2014
|
Just went to triple confirm. The search directory is ""..\..\..\..\allegro\include" (that's a copy and paste). I've even tried completely removing all of mingw, allegro and code blocks and starting over and I still encounter the problems. |
Dizzy Egg
Member #10,824
March 2009
![]() |
Hmm...my include directory looks like this: ..\..\..\..\..\allegro-5.0.10-mingw-4.7.0\include ...but I don't suppose that helps at all...are you definitely setting the options for release AND debug? Running out of ideas here!! {EDIT} You're definitely using 32 bit headers instead of 64, or 64 instead of 32, I'm convinced of that! I just don't know how to make it right...yet!...
---------------------------------------------------- |
J-Gamer
Member #12,491
January 2011
![]() |
@Dizzy: these errors are compile errors, not linking errors, so changing the linker settings won't change anything. The compiler doesn't even look at the allegro binaries. His include directory is set correctly, otherwise the compiler would just complain that it couldn't find the header to include. This might be a problem of a corrupt installation. ie: you might have header files form different versions of allegro or something. Try resetting your development environment(ie: delete EVERYTHING that has something to do with allegro and then put the appropriate headers back in place). " There are plenty of wonderful ideas in The Bible, but God isn't one of them." - Derezo |
gibbons1
Member #15,600
May 2014
|
At the moment I'm only setting the options for debug, but I've only tried using the debug output so I don't think that should matter? And the directory for the searches matches whats actually present on my C:/. I think the standard mingw compiler is 32 bit? so unless the wiki article is for setting up a 64 bit environment I don't think that could it. Though I'm not really experienced in that side of things so maybe I'm mistaken. I think the best course of action at the moment is to try another full wipe of the development environment and hope something random has happened, though I'm not hopeful given that I've done that a few times now. The only thing my mind keeps coming back to is that the allegro binaries are for 4.7 whereas I'm on 4.8 but the errors seemed to appear even if I build 4.8 binaries myself. |
pkrcel
Member #14,001
February 2012
|
There should be incomaptibility in the Binary Interface between 4.7 and 4.8...but you aren't edven getting to the point in which this should matter (i.e. the linking stage). Most probably there is something corrupt in the files you downloaded but that's really weird (?). I'm giving a look into the zip file you linked myself, to see if I spot something fishy (unlikely EDIT: gibbons1 said: However, trying to compile a simple test program resulted in errors in io.h due to off64_t being undefined. A quick google suggested that renaming the instances of off64_t to _off64_t should fix the problem. This allowed me to get past the initial errors but ended up turning up more errors as shown below. It seems likely that the problems are related, given that they both talk about this off_t variable Reading about after a short google, I EDITPLUS: Yes it's Mingw of course...and it's a problem "fixed" last sSeptemberbut still "open" today for some reasons.....see here I would suggest to switch to another environment if that wwouldbe the case (also note the 2nd name in the reporters off the bug....:P ) It is unlikely that Google shares your distaste for capitalism. - Derezo |
gibbons1
Member #15,600
May 2014
|
Ugh, so the problem all comes from that off64_t error? And yes I believe .io is mingw. I guess I'll just have to accept defeat and set up a linux install for the game dev stuff while they sort out mingw. Thanks for the help everyone. |
Dizzy Egg
Member #10,824
March 2009
![]() |
You shouldn't have to! I use all the same stuff you are, and mine works fine!!?!?!??
---------------------------------------------------- |
gibbons1
Member #15,600
May 2014
|
Yeah I totally shouldn't have too, but I think at this point I'm out of options. There's something odd going on! |
pkrcel
Member #14,001
February 2012
|
Hey I second Dizzy here....you shouldn't have to do that. Dizzy which Mingw envelope did you set up? It is unlikely that Google shares your distaste for capitalism. - Derezo |
Dizzy Egg
Member #10,824
March 2009
![]() |
I used the mingw-get program, from here: And followed the instructions on this page:
---------------------------------------------------- |
gibbons1
Member #15,600
May 2014
|
I'm not sure what is meant by the mingw envelope ? I used the mingw installer at this link http://sourceforge.net/projects/mingw/files/latest/download?source=files which I think is the same one as Dizzy. With the installer I add the following packages(all the ones listed under 'basic setup'): mingw-developer-toolkit; mingw32-base; mingw32-gcc-ada; mingw32-gcc-fortran; mingw32-gcc-g++; mingw32-gcc-objc; and msys-base. The installer then adds any dependencies. As I say I'm ready to give up - but if someone has any ideas I'll give it another go. [EDIT] One thing I've not tried is downgrading to an old version of mingw but this new installer they are using doesn't seem to make that a simple task like it should be. [EDIT2] If it helps anyone, I've gone through every single part of the allegro/mingw installation and taken screenshots in case someone spots something I've missed. |
|
1
2
|