← 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
char*)':
/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

and:

/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]: ***
[common/CMakeFiles/common.dir/dialog_about/AboutDialog_main.cpp.obj]
Error 1
[ 43%] Building CXX object
common/CMakeFiles/common.dir/dialog_about/dialog_about.cpp.obj

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:

C:/MinGW/msys/1.0/home/Wayne/src/wxWidgets-2.9.4/src/stc/scintilla/src/Document.

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!


Wayne

_______________________________________________
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

References