#include "allegro.h"
int main() {
allegro_init();
allegro_message("Hello World!");
return 0;
}
END_OF_MAIN();
Allegro
I can''t complie an allegro program in Dev-C++. I installed allegro and it gives me errors. At allegro.cc it said that I had to tell Dev-C++ that I want to complie an allegro program by using an *.a object file. But I don''t know how to include it. Anyways, here''s the code and the errors.
c:\windows\TEMP\ccVbRBfb.o
[Warning] In function `mangled_main(void)'':
[Linker error] undefined reference to `install_allegro''
[Linker error] undefined reference to `allegro_message''
c:\windows\TEMP\ccVbRBfb.o
[Warning] In function `WinMain'':
[Linker error] undefined reference to `_WinMain''
Programming Language: C++Scripting Language: HTML, PHP, and some SQLComplier: Dev-C++ 4.9.5.0
Go to the project screen and type -lalleg(I think that''s what it is) to link in the allegro satic library.
------------------------------BASIC programmers don't die, they just GOSUB and don't return.
That didn''t work. I tried typing that line into both ''Complier'' and ''Linker Options/Optional Libs or Object files'' and complied it. But this time nothing happens. I hit ''complie'' again and it says that its compling.
Programming Language: C++Scripting Language: HTML, PHP, and some SQLComplier: Dev-C++ 4.9.5.0
quote: Original post by Bert IIf installing Allegro gave you errors, chances are you don''t even have the object file. Make sure it''s installed properly, then go and write the programs
I can''t complie an allegro program in Dev-C++. I installed allegro and it gives me errors. At allegro.cc it said that I had to tell Dev-C++ that I want to compile an allegro program by using an *.a object file. But I don''t know how to include it.
Instructions for getting Allegro working with Dev-C++ are here. Follow them to the letter and if you still have problems, report your errors on the Installation forum on Allegro.CC and we''ll help you from there
Chris Barry (crbarry at mts.net)
My Personal Programming Depot
Jesus saves ... the rest of you take 2d4 fire damage.
I got the binaries. It said to move the lib and includes stuff to the one in the MinGW folder and move the DLLs to the Windows folder. I did that. And I meant I got errors when I tried compiling the SOURCE file. Last time the same thing happened when I tried compliing the project. I just click compile (the 2nd time) and it said it was compiling.
Programming Language: C++Scripting Language: HTML, PHP, and some SQLComplier: Dev-C++ 4.9.5.0
allegro.h goes in dev-c++\include\
liballeg.a goes in dev-c++\lib\
alleg??.dll goes in windows\system\
Go to project options. Put -lalleg in linker options. Put -Wall in compiler options (it tells you when you do stupid things). Also tell it not to create the console so it will use WinMain rather than main. If you would rather have the console instead, add #define ALLEGRO_NO_MAGIC_MAIN before you include allegro.
liballeg.a goes in dev-c++\lib\
alleg??.dll goes in windows\system\
Go to project options. Put -lalleg in linker options. Put -Wall in compiler options (it tells you when you do stupid things). Also tell it not to create the console so it will use WinMain rather than main. If you would rather have the console instead, add #define ALLEGRO_NO_MAGIC_MAIN before you include allegro.
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
October 08, 2002 06:40 AM
I''m not sure, but last time I heard of someone with this problem it was fixed when just just updated to the latest versions of everything, (allegro, gcc ect)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement