linker error..

Matthijs Möhlmann matthijs at cacholong.nl
Tue Nov 26 07:06:58 EST 2013


On 11/26/13, 12:11 PM, Robert Norris wrote:
> 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.
> ----
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Thank you very much, that fixed the problem.

Regards, Matthijs



More information about the Info-cyrus mailing list