Mail Archives: djgpp/1997/02/15/16:54:27
Henrik Magnusson (ens95hmn AT cs DOT umu DOT se) wrote:
: HEllo I´m a beginner in the DJGPP-world and can´t get my allegro routines to work
: I keep getting the error message: undefined reference to 'allegro_init'
: If anybody outthere can help me I would be very thankful
You need to link in the Allegro library. You are obviously correctly using
#include <allegro.h>, but you also need to put -lalleg on the gcc command line
at the linking stage. If you only run gcc once to compile and link, put it on
the end of this line. If you run gcc a few times, with the -c parameter, and
then once to link together all the object files, put it on the end of this
line instead.
If you're using RHIDE, go to Options->Linker (I think), and you should get an
array of text boxes; put 'alleg' in the highest empty box, make sure there's
an X in the box next to it, and press OK.
--
George Foot <gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk>
Merton College, Oxford.
- Raw text -