GNOME Bugzilla – Bug 413197
Cannot use from C++
Last modified: 2007-04-03 13:03:57 UTC
Copied from fink-devel mailing list (so Mac OS X, presumably 10.4/powerpc, some flavor of gcc4)... This version 2.3.18 breaks compilation of scribus. I think it will break compilation of any C++ program that uses libart. Here is a small test case: //file libartbug.c // compile with // gcc -I/sw/include/libart-2.0 -L/sw/lib -lart_lgpl_2 libartbug.c #include <libart_lgpl/art_misc.h> int main(){ void * foo = art_new(int, 3); }; It compiles OK with gcc. If you compile it with g++, you get % g++ -I/sw/include/libart-2.0 -L/sw/lib -lart_lgpl_2 libartbug.c /usr/bin/ld: Undefined symbols: art_alloc(unsigned long) collect2: ld returned 1 exit status The bug is in libart_lgpl/art_misc.h. The function declarations void *art_alloc(size_t size); void art_free(void *ptr); void *art_realloc(void *ptr, size_t size); need to be enclosed in 'extern "C"', just like the later declarations of art_die() etc are.
Created attachment 83624 [details] [review] fix header
this is a BLOCKING bug, not just "major". any C++ project using libart_lgpl cannot be compiled or linked without changes to the source code of that project. Ardour (http://ardour.org/) is also affected by this issue.
This is fixed in cvs.
FYI, this was reported as preventing the build of ... kdelibs!