strdup error on g++ with c++0x

前端 未结 4 1209
情书的邮戳
情书的邮戳 2020-12-17 00:25

I have some C++0x code. I was able to reproduce it below. The code below works fine without -std=c++0x however i need it for my real code.

How do i incl

4条回答
  •  死守一世寂寞
    2020-12-17 01:08

    add this preprocessor "_CRT_NONSTDC_NO_DEPRECATE" to Project Properties->C/C++ Build->GCC C++ Compiler->Preprocessor->Tool Settings

    Don't forget to check Preprocessor Only(-E)

    This worked for me on windows mingw32.

提交回复
热议问题