Xcode 3.2.1 and C++ string fails!

前端 未结 2 1712
半阙折子戏
半阙折子戏 2020-12-03 09:04

In Xcode 3.2.1 on Mac OS X Snow Leopard, I open a project under: Command Line Tool of type C++ stdc++. I have the following simple code:

#include 

        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-03 09:57

    An easier way of accomplishing the same thing: paste these lines at the very beginning of your program (before any #include statements):

    #define _GLIBCXX_FULLY_DYNAMIC_STRING 1
    #undef _GLIBCXX_DEBUG
    #undef _GLIBCXX_DEBUG_PEDANTIC
    

    Obviously, this will only affect the current project.

提交回复
热议问题