Hi, I forwarded your question to the Cython mailing list, which is the right place to ask these things. Please subscribe to it if you are interested in further discussion.
Jan Svec wrote: > I have one question regarding the Cython project. Can I create a generic > dynamically linked library in Cython? In other words I want to export my > Python functions as DLL. I'm not sure what you mean. Python's extension modules *are* shared libraries, so a DLL is always what you get. If with "generic" you mean: not only callable from Python, but exporting C functions that other programs can call, then the answer is: I never tried. It might work to link statically against libpython to create a DLL that does not depend on the Python library. However, there is some initialisation code involved that is called from the Python runtime. My guess is that you'd at least have to add some hand-written code that imports your module into an embedded Python interpreter so that it gets properly set up. Some example code for embedding the Python interpreter is here: http://www.freenet.org.nz/python/embeddingpyrex/ Recent developer versions of Cython accept an "--embed" flag that will generate an appropriate main() function (i.e. not exactly what you need, but the code should be similar). So I think the answer to your question is: probably yes, but not without a bit of work on your side. Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
