![]() |
|
Installing allegro and/with dev-cpp |
Don Juan
Member #6,784
January 2006
|
Hello everyone, I am a complete and utter newbie when it comes to programming. This sounds kind of silly coming from the mouth of a third year software engineering student but fact of the matter is, I know absolutly nothing. In the midst of all the theoritical stuff on how to optimize my algorithm and how to make sure my software is of good quality they forgot to make us practice the theory (granted I could of practiced on my own...). Anyways, I currently bought a book on how to program games using C and the Allegro library. Being excited and extremely motivated I made it to page 55 of 500 only to get stuck in the installation! I followed every step (I think... I tried like five times...) only to fail. I figured I could try to download the latest version of both dev-cpp and allegro but the site that contains the tutorial on how to install them doesn't exist (error 404)... See, I don't really know how libraries and dev-cpp "hold hands" and I was never able to make them work! So... if any of you guys know a good site (for a dummy) that explains how to install both these things together and explains why things are done without skipping any steps could you please refer me to them? Thanks a lot in advance Seb [edit] PS: If there are no good webpages on the subject but someone is generous enough to help me install it, that is acceptable too |
khristina yer
Member #5,795
May 2005
![]() |
I might be wrong but I believe there is some documents in the src folders of allegro |
Evert
Member #794
November 2000
![]() |
Quote: I currently bought a book on how to program games using C and the Allegro library. Let me guess: Game Programming All in One, second edition? Quote: I figured I could try to download the latest version of both dev-cpp and allegro but the site that contains the tutorial on how to install them doesn't exist (error 404)... See, I don't really know how libraries and dev-cpp "hold hands" and I was never able to make them work!
I assume you have no problems with installing Dev-C++, as I figure it comes with a standard Windows installer. I wouldn't be able to help anyway. |
Murat AYIK
Member #6,514
October 2005
![]() |
Download this:http://prdownloads.sourceforge.net/alleg/allegro-4.2.0-1mol.DevPak _____________________________________________________ |
Don Juan
Member #6,784
January 2006
|
Hey guys, Thanks for the speedy reply. You are correct, it is in fact that book. Was it a bad choice on my part to purchase it? Also, the book came with a cd which already had the devpaks. I did install them but when I coded the script to check whether allegro was configured right it didn't want to compile. Something about not finding some file (alle40.dll or something similar to it). Someone mentioned in a thread that you had to write a path or something somewhere and the book also mentions this in the annexe but they never say which file to modify and what does what. That's where I got stuck. [edit] Well I DLed all the most recent versions and tried installing them following the intructions in the readme file of the precompiled version of allegro. After copy pasting the files in the right folders I got this compilation error.
[Linker error] undefined reference to '__gxx_personality_v0' okays... umm in the readme it says this: The contents of the "bin" folder (three DLLs) should be placed Now how do I put it in the system's "PATH"? Do I have to edit a file? Which one? |
relpatseht
Member #5,034
September 2004
![]() |
You move the dlls from C:\Dev-C++\bin\alleg*.dll to C:\Windows\System32 However, that won't prevent this compiler error.
|
ReyBrujo
Moderator
January 2001
![]() |
It seems it is an error from the Dev-C++ installation. You could try installing a newer version of Dev-C++. -- |
Evert
Member #794
November 2000
![]() |
Quote: [Linker error] undefined reference to '__gxx_personality_v0'
That linker error means that you have compiled the code as C++ code but are trying to link it as C code. In that case, you won't be linking the C++ library, whence the error. Regarding the code you posted, here's a correct version (yes, I know you copy&pasted that from the book): #include <stdlib.h> #include "allegro.h" int main() { allegro_init(); allegro_message("Allegro version = %s\n", allegro_id); return 0; } END_OF_MAIN()
|
gnolam
Member #2,030
March 2002
![]() |
Evert: don't you mean #include <stdlib.h> #include <allegro.h> int main() { allegro_init(); allegro_message("Allegro version = %s\n", allegro_id); return 0; } END_OF_MAIN()
? -- |
Don Juan
Member #6,784
January 2006
|
Awesome! Well I'm not too sure what the conio.h file does... regardless the program compiled and ran! I had set up the project as a c++ (unintentionally) but was writing my code in C. So I made a new project and pasted my code in there. It compiled and I got my console app. On a side note, I noticed that in your code you didn't include a semi colon at the end of END_OF_MAIN() was that intentional, if so, how does it work? Thanks a lot guys, like A LOT. Seb |
gnolam
Member #2,030
March 2002
![]() |
Quote: On a side note, I noticed that in your code you didn't include a semi colon at the end of END_OF_MAIN() was that intentional, if so, how does it work? It's intentional. END_OF_MAIN() is a macro expanding to a function, like this: int foo() { } So any semicolon will just be tacked on after the brace, which is superfluous. -- |
Evert
Member #794
November 2000
![]() |
Quote: Evert: don't you mean Yes. I also meant to include void as the argument to main, though that is even more of a stylistic question. Quote: Well I'm not too sure what the conio.h file does... Nothing useful. It declares the getch() function which is not a standard C function that you have no reason to use anyway. |
|