After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 413197 - Cannot use from C++
Cannot use from C++
Status: RESOLVED FIXED
Product: libart
Classification: Deprecated
Component: Other
unspecified
Other All
: Normal blocker
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-02-28 20:15 UTC by Daniel Macks
Modified: 2007-04-03 13:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix header (546 bytes, patch)
2007-03-01 08:27 UTC, Götz Waschk
none Details | Review

Description Daniel Macks 2007-02-28 20:15:35 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.
Comment 1 Götz Waschk 2007-03-01 08:27:37 UTC
Created attachment 83624 [details] [review]
fix header
Comment 2 Paul Davis 2007-03-01 18:37:56 UTC
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.
Comment 3 Alexander Larsson 2007-03-02 10:02:33 UTC
This is fixed in cvs.
Comment 4 Loïc Minier 2007-04-03 13:03:57 UTC
FYI, this was reported as preventing the build of ... kdelibs!