Re: compiling errors
On Mon, Jul 31, 2000 at 12:57:22PM -0400, Patrick Dahiroc wrote:
> hi all
>
> i'm having problems compiling a c++ program with g++. the errors
> that i get are
> <SNIP>
> MapCB.o: In function `cMapDisp::cMapDisp(TACTMAP_OBJECT_CLASS)':
> MapCB.o(.text+0x172): undefined reference to `callback_define_event(int,...)'
> MapCB.o(.text+0x18a): undefined reference to `callback_define_event(int,...)'
> MapCB.o(.text+0x1d2): undefined reference to `callback_register_handler(cb_event *, void (*)(void), void *)'
> MapCB.o(.text+0x1f2): undefined reference to `callback_register_handler(cb_event *, void (*)(void), void *)'
> </SNIP>
If you are linking with a library written in C, make sure it has
#ifdef __cplusplus
extern "C" {
#endif
at the top if its header file, and
#ifdef __cplusplus
}
#endif
at the bottom.
Cheers,
Chris
--
pick, pack, pock, puck: like drops of water in a fountain falling
softly in the brimming bowl.
Reply to: