← Back to team overview

kicad-developers team mailing list archive

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


On 11/14/2012 3:06 PM, Wayne Stambaugh wrote:
Just a heads up for anyone who attempts to build testing r3800 on
Windows with MinGW (GCC 4.7.2) and wxWidgets 2.9.4, you will get the
following build errors everywhere <wx/string.h> is included in the source:

/mingw/include/wx-2.9/wx/wxcrtbase.h: In function 'char* wxStrdup(const
/mingw/include/wx-2.9/wx/wxcrtbase.h:697:62: error: '_strdup' was not
declared in this scope
/mingw/include/wx-2.9/wx/wxcrtbase.h: In function 'wchar_t*
wxStrdup(const wchar_t*)':
/mingw/include/wx-2.9/wx/wxcrtbase.h:698:68: error: 'wcsdup' was not
declared in this scope


/mingw/include/wx-2.9/wx/string.h: In function 'int Stricmp(const char*,
const char*)':
/mingw/include/wx-2.9/wx/string.h:174:31: error: 'strcasecmp' was not
declared in this scope
make[2]: ***
Error 1
[ 43%] Building CXX object

My guess is that _strdup, wcsdup, and strcasecmp are wrapped in an
#ifdef/#endif block in the MinGW header files that undefines these
functions when the -std=++0x flag is used.  I confirmed this by
commenting out the line in the main CMakeList.txt file.  Obviously this
also fails due to the new std::unique_ptr calls which require the
-std=c++0x flag.  So I attempted to rebuild wxWidgets 2.9.4 with
-std=c++0x defined and got this error message:


cxx:1466:33: error: 'isascii' was not declared in this scope

I don't have time to look at this right now so hopefully someone can
figure this out before I can get some time to look at it.

Never mind.  I see JP just committed a fix for this.  Thanks JP!


Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Follow ups