Orochimarufan / PythonQt

PythonQt fork featuring Qt 5.x and Python 3.x support and improved CMake build system
GNU Lesser General Public License v2.1
48 stars 20 forks source link

Remove dependencies on `std::` library classes. #5

Open dbrnz opened 10 years ago

dbrnz commented 10 years ago

This allows PythonQt to be compiled under OS/X 10.9 and Xcode 5.1 as part of a large Qt 5.3 project. Without this change there are numerous errors like:

In file included from ../src/plugins/thirdParty/PythonQtAPI/src/PythonQtAPIPlugin.cpp:23:
In file included from ../src/plugins/thirdParty/PythonQtAPI/src/PythonQtManager.h:27:
In file included from ../src/plugins/thirdParty/PythonQtAPI/PythonQt/src/PythonQt.h:58:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:436:15: error: C++ requires a type specifier for all
      declarations
    char_type toupper(char_type __c) const
              ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyport.h:731:29: note: expanded from macro 'toupper'
#define toupper(c) towupper(btowc(c))
                            ^~~~~
In file included from ../src/plugins/thirdParty/PythonQtAPI/src/PythonQtAPIPlugin.cpp:23:
In file included from ../src/plugins/thirdParty/PythonQtAPI/src/PythonQtManager.h:27:
In file included from ../src/plugins/thirdParty/PythonQtAPI/PythonQt/src/PythonQt.h:58:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:442:48: error: too many arguments provided to
      function-like macro invocation
    const char_type* toupper(char_type* __low, const char_type* __high) const
                                               ^
/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyport.h:731:9: note: macro 'toupper' defined here
#define toupper(c) towupper(btowc(c))
        ^