[Cython] Fwd: Question about how best require compiler options for C sources

Erik Bray erik.m.bray at gmail.com
Tue Apr 12 04:08:07 EDT 2016


On Mon, Apr 11, 2016 at 7:38 PM, Jeroen Demeyer <jdemeyer at cage.ugent.be> wrote:
> On 2016-04-11 15:23, Erik Bray wrote:
>>
>> In this case I really do want the symbol "hello" to be
>> exported by the DLL, as well as be understood between translation
>> units making up the same library.
>
>
> Are you really sure that you want this? I doubt that this is supported on OS
> X: on OS X, there are two kinds of files: shared libraries (with .dylib
> extension) and loadable modules or bundles (usually with .so extension but
> officially with .bundle extension).
>
> C extensions for Python are compiled as a loadable module and I don't think
> you can link against these. See
> http://stackoverflow.com/questions/2339679/what-are-the-differences-between-so-and-dylib-on-osx
>
> Some details in the above might be wrong, but I remember running into this
> issue in some early version of cysignals.

OSX issues aside, I was under the impression that this is needed for
cysignals in particular.  If I'm wrong on that then this simplifies
matters a good deal, and per njs Cython could just drop the use of
DL_IMPORT and we'd be fine.


More information about the cython-devel mailing list