← Back to team overview

kicad-developers team mailing list archive

Re: -std=c++0x break build on MinGW and wxWidgets 2.9.4



Really, even of you are inclined to say that MingW simply does not expose _strdup() or
strdup() when __STRICT_ANSI__
is defined, because of this in mingw's string.h:

#ifndef __STRICT_ANSI__

_CRTIMP char* __cdecl __MINGW_NOTHROW     _strdup (const char*) __MINGW_ATTRIB_MALLOC;


You still have to blame the wx folks for not working around the problem which pops up when
using -std=c++0x.

It looks like wx might be poised to provide their own

#ifndef wxCRT_StrdupA
WXDLLIMPEXP_BASE char *wxCRT_StrdupA(const char *psz);

under some circumstances.  This is one path to solution, but another one is to simply
provide a function prototype for _strdup() somewhere.  It is not like the function has
disappeared from MingW runtime libraries.  It is still there and you could link to it no

Follow ups