[Cython] libc.string msvc incompatibility

Robert Bradshaw robertwb at gmail.com
Tue Apr 23 19:24:18 CEST 2013


It would at the very least be worth putting a note on these functions,
but I'm not sure how far we should go with aliasing the
platform-specific alternatives. Certainly a .h file that you "cdef
extern from" include with these defines would be the shortest path to
getting things working on your side.

On Tue, Apr 23, 2013 at 7:56 AM, Dave Hirschfeld
<dave.hirschfeld at gmail.com> wrote:
>
> When trying to use strcasecmp from libc.string I get an error compiling with
> msvc:
>
> error C3861: 'strcasecmp': identifier not found
>
> It seems MS have decided to call it by another name - _stricmp
>
> ...amongst others:
>
> http://botsikas.blogspot.co.uk/2011/12/strcasecmp-identifier-not-found-
> when.html
>
>
> I'm wondering if it's possible for cython to include the mentioned ifdef
> defines by default or otherwise solve the problem so that code is portable
> between compilers on Windows? I understand if it's not a high priority issue.
>
> The workaround is for me to make sure all our code compiles with mingw which
> was on the radar anyway.
>
> Thanks,
> Dave
>
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> http://mail.python.org/mailman/listinfo/cython-devel


More information about the cython-devel mailing list