|
Ubuntu 14.04LTS + Code::blocks 13.12 |
seanfcarney
Member #14,672
November 2012
|
Update: All is well. Recompiled allegro5 from source (using wiki guide). Then linked Allegro files to compiler in C::B and all is well. Was able to display a basic window. Now begins the learning. ========================= Okay. Trying to set Allegro 5.0.1 up on my lap top. OS: Ubuntu 14.04LTS Compilers (apologize for formatting): Problem: I compiled Allegro 5.0.1 properly using CMake (I hope). I then tried to compile the following code and received error messages: =================================================== int main(void) "Whatever|Maybe", "ALLEGRO_MESSAGEBOX_YES_NO"); return -1; if(!al_init()) ||=== Build: Debug in alkdsjf (compiler: GNU GCC Compiler) ===| What am I messing up here? Most errors center around al_show_etc... lines. If more information is needed just let me know. I will admit that I am new to both Ubuntu and Allegro. Thanks in advance. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
First of all, 5.0.1 is really old. You should use a binary for 5.0.10 or 5.1.9 if available, or compile one of those versions.
Quote:
int al_show_native_message_box( ALLEGRO_DISPLAY *display, char const *title, char const *heading, char const *text, char const *buttons, int flags );
The first call to al_show_native_message_box is wrong because the last parameter should be an integer (ALLEGRO_MESSAGEBOX_YES_NO), not a string ("ALLEGRO_MESSAGEBOX_YES_NO"). seanfcarney said:
al_show_native_message_box( NULL, "3.8", "321World!", "Hello world!", "Whatever|Maybe", "ALLEGRO_MESSAGEBOX_YES_NO" ); al_show_native_message_box(NULL, NULL, NULL, Error!, NULL, NULL);
Again, the last parameter should be an int flag ALLEGRO_MESSAGEBOX_YES_NO, not a pointer (NULL) My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
SiegeLord
Member #7,827
October 2006
|
I suggest using the PPAs with Ubuntu: http://liballeg.org/download.html#ubuntu-ppa, if you want to avoid the (minor) pain of compiling it yourself. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
seanfcarney
Member #14,672
November 2012
|
To get the PPA, do I need to create a login? Could not find a way to acquire the PPA. Maybe I am misunderstanding the usage of PPA's though. From what I gather I need to download the PPA then use a few command line entries to make everything work, is this correct? I will probably update Allegro5 once I completely install this version. Just want to successfully install it so that I can see the process and what is involved. Building from source was not super challenging with the resources provided on the allegro.wiki. Changed code to the following: int main(void) { al_show_native_message_box(NULL, "3.8","321World!", "Hello world!", "Whatever|Maybe", 2); return -1; } I omitted the last al_show_native_message_box() statement( maybe in error, looked like error handling statement). Just trying to simplify code for testing purposes. When I tried to compile the above I received the following: ||=== Build: Debug in alkdsjf (compiler: GNU GCC Compiler) ===| AGAIN, thanks for dealing with my newbish ways. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
You need to link to the native dialog addon. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
SiegeLord
Member #7,827
October 2006
|
I've added a small tutorial on how to use PPAs here: https://wiki.allegro.cc/index.php?title=Install_Allegro_from_Ubuntu_PPAs "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
seanfcarney
Member #14,672
November 2012
|
Thanks be to the both of you. I upgraded my laptop from Ubuntu 32-bit to Ubuntu 64-bit. Therefore, I will be repeating this process this weekend. This will give me the ability to step up to the newest stable Allegro5. I would really like to complete the build from source route + proper linking so that I can learn how to properly add new resources to my computer. I will review the PPA (makes me think of Philadelphia Parking Authority, of which I do not have a great relationship with)tutorial as well because I am deficient in this area as well. Thank you both. Will update as I proceed this weekend. Sean EDIT: Wow. Just reviewed you PPA tutorial and that looks remarkably easy. |
|