Mail Archives: djgpp/1998/10/21/21:55:23
I cannot successfully link this library into my code.
I have a working installation (fresh) of Allegro 3.0, and am using C++.
I installed the LibAmp library as instructed, by using 'make install'.
The header and library files were copied to the /include and /lib folders of
my root DJGPP folder (checked).
The example programs (libdemo.exe and playmp3.exe) compiled successfully
and worked. (Both are C, not C++).
The instructions state that to use the library, you must add
#include "libamp.h"
to your code (done), and link with -lamp (done using RHIDE, the same way
the allegro library is specified).
Whenever I compile, I get errors stating that all of the LibAmp
functions I am using are undefined.
Error: malt11e.o: In function `main':
malt11e.cpp(154) Error: undefined reference to `install_amp(void)'
malt11e.cpp(951) Error: undefined reference to `load_amp(char *, int)'
malt11e.cpp(957) Error: undefined reference to `unload_amp(void)'
malt11e.cpp(963) Error: undefined reference to `replay_amp(void)'
There were some errors
Usage of these functions in my code is correct as per the prototypes.
These line numbers do not correspond with the actual places in my code
where the functions are called! install_amp is used in line 4430, load_amp
in line 5227, unload_amp in 5233, and replay_amp in line 5239!
Does this make any sense to anyone? Is there something different that
has to be done for C++ as opposed to standard C?
- Raw text -