linker error..
Robert Norris
robn at fastmail.fm
Tue Nov 26 06:11:52 EST 2013
On Tue, Nov 26, 2013, at 09:56 PM, Matthijs Möhlmann wrote:
> When I try to build the above I'll get:
> matthijs at hammer:~/t$ g++ -std=c++11 -o main -lcyrus -lcyrus_min main.cpp
> /tmp/ccqJI9xZ.o: In function `main':
> main.cpp:(.text+0x26): undefined reference to
> `imclient_connect(imclient**, char const*, char const*, sasl_callback*)'
> collect2: error: ld returned 1 exit status
It looks like the Cyrus headers don't force C linkage when being
compiled for C++. Try:
extern "C" {
#include <cyrus/imclient.h>
}
Cheers,
Rob N.
More information about the Info-cyrus
mailing list