like this wx console demo:
#include <wx/wx.h>
#include <wx/stdpaths.h>
#include <memory>
int main()
{
std::shared_ptr<int> sp(new int(10));
wxStandardPaths path;
wxPuts(path.GetExecutablePath());
return 0;
}
if use -std=c++0x, will have many error:
||=== wxCmd, src ===|
D:\DengYC\LoveDEV\sdk\wx\include\wx\buffer.h||In constructor 'wxCharBuffer::wxCharBuffer(const char*)':|
D:\DengYC\LoveDEV\sdk\wx\include\wx\buffer.h|127|error: 'strdup' was not declared in this scope|
D:\DengYC\LoveDEV\sdk\wx\include\wx\buffer.h||In member function 'wxCharBuffer& wxCharBuffer::operator=(const char*)':|
D:\DengYC\LoveDEV\sdk\wx\include\wx\buffer.h|127|error: 'strdup' was not declared in this scope|
D:\DengYC\LoveDEV\sdk\wx\include\wx\buffer.h||In constructor 'wxWCharBuffer::wxWCharBuffer(const wchar_t*)':|
D:\DengYC\LoveDEV\sdk\wx\include\wx\buffer.h|134|error: '_wcsdup' was not declared in this scope|
D:\DengYC\LoveDEV\sdk\wx\include\wx\buffer.h||In member function 'wxWCharBuffer& wxWCharBuffer::operator=(const wchar_t*)':|
D:\DengYC\LoveDEV\sdk\wx\include\wx\buffer.h|134|error: '_wcsdup' was not declared in this scope|
D:\DengYC\LoveDEV\sdk\wx\include\wx\string.h||In function 'int Stricmp(const char*, const char*)':|
D:\DengYC\LoveDEV\sdk\wx\include\wx\string.h|141|error: 'strcasecmp' was not declared in this scope|
D:\DengYC\LoveDEV\sdk\wx\include\wx\list.h||In constructor 'wxListKey::wxListKey(const wxChar*)':|
D:\DengYC\LoveDEV\sdk\wx\include\wx\list.h|406|error: '_wcsdup' was not declared in this scope|
D:\DengYC\LoveDEV\sdk\wx\include\wx\list.h||In constructor 'wxListKey::wxListKey(const wxString&)':|
D:\DengYC\LoveDEV\sdk\wx\include\wx\list.h|408|error: '_wcsdup' was not declared in this scope|
||=== Build finished: 7 errors, 0 warnings ===|
but if change -std=c++0x to -std=gnu++0x, it can be fixed.
Index: src/plugins/compilergcc/compilerMINGW.cpp
===================================================================
--- src/plugins/compilergcc/compilerMINGW.cpp (revision 6193)
+++ src/plugins/compilergcc/compilerMINGW.cpp (working copy)
@@ -115,7 +115,7 @@
m_Options.AddOption(_("Stop compiling after first error"), _T("-Wfatal-errors"), category);
m_Options.AddOption(_("Inhibit all warning messages"), _T("-w"), category);
m_Options.AddOption(_("Have g++ follow the 1998 ISO C++ language standard"), _T("-std=c++98"), category);
- m_Options.AddOption(_("Have g++ follow the coming C++0x ISO C++ language standard"), _T("-std=c++0x"), category);
+ m_Options.AddOption(_("Have g++ follow the coming C++0x ISO C++ language standard"), _T("-std=gnu++0x"), category);
m_Options.AddOption(_("Enable warnings demanded by strict ISO C and ISO C++"), _T("-pedantic"), category);
m_Options.AddOption(_("Treat as errors the warnings demanded by strict ISO C and ISO C++"), _T("-pedantic-errors"), category);
m_Options.AddOption(_("Warn if main() is not conformant"), _T("-Wmain"), category);
[attachment deleted by admin]