2009/1/23 Robert Bradshaw <rober...@math.washington.edu>:
>
> Is this C++? If so, one needs a language="c++" in the Extension line.
> At this point I might see if you can write a simple C program that
> can call your cdd library which will expose wether or not the issue
> is with Cython/distutils or the cdd library you're using.

'found it!
The library, which is C code, is built with g++ instead of gcc. As the
public function are not declared with the extern "C" construct, their
name gets mangled when compiled by g++. I finally understood while
reading [1] and thanks to Burcin comments.

The problem lies in the library building tools, and has been corrected
upstream a year ago. From cddlin changelog:

Version 094e (February 7, 2008) /
 - Thanks to Sven Verdoolaege's fixes,
   the "configure" script now uses "gcc" as the default
   compiler, rather than "g++" in earlier releases,
   and the libraries can be linked properly with
   both C and C++ programs.

Sage uses version 094b, which was released in August 2005.

I will file a ticket on trac and try to package the last version.
Thank you for your help.

[1] http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html

-- 
Sébastien Barthélemy

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to