← 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:12 PM, Wayne Stambaugh wrote:
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!

I spoke too soon.  Now I'm getting this error:

e:/src/kicad-testing/trunk/polygon/PolyLine.cpp:147:21:   required from here
e:/src/kicad-testing/trunk/include/boost/polygon/point_3d_concept.hpp:95:3: erro r: no type named 'type' in 'struct boost::enable_if<mpl_::bool_<false>, boost::p
olygon::point_data<int> >'
make[2]: *** [polygon/CMakeFiles/polygon.dir/PolyLine.cpp.obj] Error 1
make[1]: *** [polygon/CMakeFiles/polygon.dir/all] Error 2
make: *** [all] Error 2

It looks like the boost polygon library doesn't play nice GCC 4.7.2 on MinGW with -std=gnu++0x.




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



_______________________________________________
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




References