Friday, July 31, 2009

HELP!!!! Why wont Allegro work?

i downloaded the Allegro Devpak, from devpaks.org. I got a test program from cppgameprogramming.com (the first source code in the allegro basics section) I contiually get linker errors such as








[Linker error] undefined reference to `install_keyboard'





[Linker error] undefined reference to `set_gfx_mode'





[Linker error] undefined reference to `readkey'





etc.,etc.,etc.





Here is my compiler version and Allegro version


pls help





Compiler:Dev-Cpp v. 4.9.8.0


Allegro Devpak : v. 4.2.0

HELP!!!! Why wont Allegro work?
From what errors I see hear, the headers or libraries (and more likely the headers) are installed, but not found by the linker at the appropriate time and place. There are four common things that may cause this type of linker error to my knowledge.





1) Manually open the directory that Allegro allegedly installed the headers and libraries to and check that they are there. You could also recheck the install from the DevPak intsallation screen.





2) Make sure that you've got the Allegro headers and libraries added into the project correctly from the Project | Options | Parameters Tab. (ALT-P, select Parameters at the top.) It should be added in the Linker section (Add Libraries or Objects).





3) This next seems like a no-brainer, but check that you selected a new Allegro GUI project from the New Project Dialog box. Selecting the wrong project happens once in a while and is hard to check after it happens, so start carefully over to try it out.





4) When all else has failed, read all the readmes that exist in the Allegro installation directories. They will note anything funky I may have missed, usually.





These are the biggest, most common booboos that I've seen (and pulled! ;-) when trying to add in new libraries and such. I hope it gets you working again.


No comments:

Post a Comment