On Sun, Sep 22, 2013 at 02:10:27PM +0200, Nathann Cohen wrote:
> > does it run outside of sage/distutils magic (with cython and gcc called
> > manually)? should be easier to debug...
> 
> Hmmm... I just made it work by compiling the .cc file as a shared
> library, and linking the .pyx with the library in modules_list.py.

what you probably want to make work is one pyx and one cc in one python
object. a library and linking sounds like overkill.

> But I can't get it to work by having Cython compile this cursed .cc file :-P

by having /distutils/ compile it? does it work if you compile manually?
something like

$ cython somefile.pyx -o somefile.cc
$ c++ somefile.cc -shared -fPIC <whateverelse> -o somefile.o
$ c++ yourfile.cc -shared -fPIC <whateverelse> -o yourfile.o
$ c++ yourfile.o somefile.o -o somemodule.so

> Now it is telling me that I define several methods twice. Ahahahah.
> This thing is a nightmare ;-)

sounds much like forgotten #ifndef something\n#define someting and
#endif in your header... (?)

> So is there any place in Sage where you can write a couple of calls to
> gcc, to make a library out of a .cc file ? The only place I know is a
> spkg, and that's too much trouble ^^;

without distutils, that would be easy :/

regards
felix

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to