Re: linker error..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 26, 2013, at 09:56 PM, Matthijs Möhlmann wrote:
> When I try to build the above I'll get:
> matthijs@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





[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux