|
really in need of assistance building allegro 4.4.1 |
xadow123
Member #14,602
October 2012
|
i really can't understand the instructions provided in the docs(allegro-4.4.1.zip) on how to build this version of allegro. i haven't had any experience building allegro in the past so i'm really lost and barely have an idea on how to do things. i used a precompiled version of allegro in the past. assistance is very much appreciated. now here's what i done: 1. downloaded allegro-4.4.1.zip from http://sourceforge.net/projects/alleg/files/allegro/4.4.1/ 2. opened the zip file and went to allegro-4.4.1->allegro->docs->build by the way, i'm trying to build this allegro with microsoft visual studio 2010 express edition. 3. done some reading and barely understand anything , i went to this site to download cmake: http://www.cmake.org/cmake/resources/software.html 4. i don't know what to download. the latest release??? source or binary distribution??? help please. specifying the exact filename is very much appreciated. |
Audric
Member #907
January 2001
|
You should start with Allegro 5, unless you have a specific reason to use Allegro 4 (such as: build an existing program made in allegro 4) |
weapon_S
Member #7,859
October 2006
|
Allegro 5 is the modern variant. Allegro 4 is more old-school. And even then, 4.4.2 is newer and available. References
|
Arthur Kalliokoski
Second in Command
February 2005
|
weapon_S said: Extract the archive, while preserving directory structure[1], over[2] the existing folders. But mixing the OEM files and your files is bad because if you need to reinstall MSVC, you have to do this all over again, yadda yadda yadda. I've finally gotten it to use libraries in another directory by setting the environment variables set LIB=%LIB%<path to allegro libraries>; set LIBPATH=%LIBPATH%<path to allegro libraries>; The LIB and LIBPATH end with semicolons, so you don't need them in front of your paths. [EDIT] You can also specify it in the IDE settings (this is VS 2008, i.e. MSVC 9) {"name":"606684","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/a\/3af3f096d9b75505df2bd76368a56b12.png","w":800,"h":600,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/a\/3af3f096d9b75505df2bd76368a56b12"} They all watch too much MSNBC... they get ideas. |
xadow123
Member #14,602
October 2012
|
@Audric: i'm studying this book by Jonathan Harbour: "Game Programming All In One 3rd Edition" and it uses allegro 4.2. however, recently i've found that there are memory leaks when using install_sound(). see this post of mine: http://www.allegro.cc/forums/thread/611184 no! no! there's no way i can ignore that and continue using a library that creates memory leaks. somebody suggested testing allegro 4.4.1 and see if the memory leaks were resolved so i'm trying to build this version. @weapons_S: so there's a precompiled version! that's all i need. i know where to go now from here. thanks for saving me a lot of trouble! to all: thanks for the replies. i've successfully linked my project with allegro 4.4.2 by following the steps in the link given by Audric though its for allegro 5. unfortunately, there are still memory leaks though from 6 memory leaks, its now down to 2. a call for allegro 4.4.3 is in session! memory leak in 4.2.3: {"name":"memory_leak_in_allegro_4_2_3.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/d\/9ddaca22cbddfc4d9979ae0178595a1f.png","w":1141,"h":306,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/d\/9ddaca22cbddfc4d9979ae0178595a1f"} memory leak in 4.4.2: {"name":"memory_leak_in_allegro_4_4_2.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/4\/74c7a1e04e479cfdd7cd8873ba6b09d0.png","w":565,"h":190,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/4\/74c7a1e04e479cfdd7cd8873ba6b09d0"} source code: 1#include <allegro.h>
2#include <crtdbg.h>
3
4int main()
5{
6 //memory leak detector
7 _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
8
9 allegro_init();
10
11 set_color_depth(32);
12 set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
13
14 install_keyboard();
15 install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, NULL);
16
17 readkey();
18
19 remove_sound();
20 allegro_exit();
21
22 return 0;
23}
24END_OF_MAIN()
[EDIT]: by the way, can you guys test if the memory leaks are also present in allegro 5 when initializing the sound module. |
weapon_S
Member #7,859
October 2006
|
Actually there is a 4.4.3 . |
xadow123
Member #14,602
October 2012
|
weapon_S said: Actually there is a 4.4.3 . i really hope the memory leak issue is finally resolved in this version. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
If you're worried about 2k + 24bytes of memory leaked that goes away when the program is finished you're nuts. That's a single leak of a very small size. You do not need to worry about this. The OS will take care of it when the program exits, unless you're using DOS, and it would still take absolutely forever to exhaust memory at that pace. Stop worrying about it. The only way it would get fixed is if you found the leak, patched it, and got someone to apply your patch to 4.4. It is very unlikely that another version of 4.4 will ever be released since it is not being worked on by anyone. Either use 4.4 as is, or upgrade to 5, and stop worrying about it. And Jonathan Harbour's book sucks so don't treat it like a Bible. We know Allegro way better than he does. 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 |
Thomas Fjellstrom
Member #476
June 2000
|
Well if the fix is easy, we should fix it, but maybe not in 4.2. I think 4.4 is probably the only allegro 4 version we support at all these days. -- |
Audric
Member #907
January 2001
|
I can confirm that many people over the years have come here for help because the book itself had errors, even some code samples that don't compile. Sure, everybody can make mistakes, but this author doesn't seem to have built up an online erratum or anything. |
xadow123
Member #14,602
October 2012
|
Edgar Reynaldo said: If you're worried about 2k + 24bytes of memory leaked that goes away when the program is finished you're nuts. come to think of it you're right. its just a tiny memory leak. i was only focusing on the string "Detected memory leaks!" and panicked right away that i forgot to look at the size of it. with all these information overload trying to learn game programming, one can easily go nuts! i'm about to give up on allegro but with what you said i think i'm gonna give it another chance. Quote: And Jonathan Harbour's book sucks so don't treat it like a Bible. Its okay as long as you know how to spot and handle the errors. The book examples show how to use allegro in a much simpler way than in the allegro demos so its more friendly to allegro newbies. Thomas Fjellstrom said: Well if the fix is easy, we should fix it, but maybe not in 4.2. I think 4.4 is probably the only allegro 4 version we support at all these days. i'm okay with 4.4. basically the same with 4.2. @Audric: The book is okay as long as you know how to tweak things. The author has a forum(http://jharbour.com/forum/index.php?PHPSESSID=7eoe03922ld1m5lcndllb41f36&board=19.0) and i think the book's issues were addressed there. |
Thomas Fjellstrom
Member #476
June 2000
|
I really think you should stick to it. Allegro, even Allegro 4 is quite nice (though I prefer Allegro 5 these days, Allegro 4 does have its place). -- |
LennyLen
Member #5,313
December 2004
|
xadow123 said: The author has a forum and i think the book's issues were addressed there. He actually deleted lots of the threads where people pointed out errors in the book.
|
xadow123
Member #14,602
October 2012
|
by the way, regarding the memory leaks, after following weapon_S's instructions, it didn't appear anymore. if you're interested, just check it here: http://www.allegro.cc/forums/thread/611184 LennyLen said: He actually deleted lots of the threads where people pointed out errors in the book.
int respectForJHarbour = 3; |
weapon_S
Member #7,859
October 2006
|
Little thread hijack: what is the exact address of the 4.4 git repo? |
|