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