[OTR-users] libotr on Debian

Ian Goldberg ian at cypherpunks.ca
Tue Jun 16 20:48:34 EDT 2009


On Tue, Jun 16, 2009 at 04:22:33PM -0700, Patrick Tierney wrote:
> Hello,
> 
> I'm using libotr 3.2 with g++ on a Debian system, and I am receiving a
> linking error.  In particular, the linker ld cannot find otrl_init().
> I am linking with a standard -lotr flag with g++.  The error occurs
> both with the libotr2 Debian package, and when I download and install
> libotr 3.2 myself.
> 
> Here's the g++ output:
> main.cpp:(.text+0x16b): undefined reference to `otrl_init(unsigned
> int, unsigned int, unsigned int)'
> collect2: ld returned 1 exit status
> makepp: error: status (1), stopping now
> 
> Thanks in advance for any help,

Try putting

extern "C" {
    ...
}

around your libotr #include lines.

   - Ian



More information about the OTR-users mailing list