OK well I am using Dev-Cpp version 4.9.9.2 and I just downloaded the Allegro library and installed it from the Dev-Cpp Server. For some reason though, every time I try to compile a program such as:
| 1 | #include <allegro.h> |
| 2 | |
| 3 | |
| 4 | |
| 5 | int main(void) |
| 6 | |
| 7 | { |
| 8 | |
| 9 | allegro_init(); |
| 10 | |
| 11 | allegro_message("Allegro version = %s\n", allegro_id); |
| 12 | |
| 13 | return 0; |
| 14 | |
| 15 | } |
| 16 | |
| 17 | END_OF_MAIN() |
I get this error message:
cannot find -lobjc
ld returned 1 exit status
Did I install the library wrong? can someone please help? And my apologies if someone has posted this question before.
Do you have dev-cpp set to compile programs as objective-C? I wasnt sure this is even possible but that what Im guessing '-lobjc' is for. Can you change the "language setting" to C or C++?
Ah sorry about that my compiler wasn't compiling properly. I re-downloaded Dev, but I am still faced with an error when I compile the code. Now i get:
[Linker error] undefined reference to `_imp__allegro_id'
[Linker error] undefined reference to `allegro_message'
[Linker error] undefined reference to `_get_allegro_version'
[Linker error] undefined reference to `get_config_text'
[Linker error] undefined reference to `_imp__allegro_error'
[Linker error] undefined reference to `ustrzcpy'
[Linker error] undefined reference to `_install_allegro'
[Linker error] undefined reference to `_WinMain'
ld returned 1 exit status
Do you have any suggestions for that error?
You need to link to the Allegro library. To do this, go to the Project Options, and under the Parameters tab, click "Add library or object." The Allegro library will be in the MinGW\lib directory and is named liballeg.a.
I installed DevCPP yesterday and got it all running and working with Allegro!!! thank you guys for helping me!!! 
I found it much easier to just download and install the DevPak for allegro.
I've also downloaded numerous other devpaks from devpaks.org such as AllegroGL, Irrlicht, Openlayer and can't wait to get my hands dirty again programming!!!
Oh thanks guys it works! Just a quick question, I don't need any other special applications to program graphics do I? should be good to go right?
You shouldn't need anything else, you can load and manipulate images in your program using the Allegro library, once you start getting into more complexed stuff you can download various libraries and devpaks for use in devcpp
Asam
Awesome thanks for the help guys I really appreciate it!