[win10 & VS2015] Compile Error in a simple C project: "(" should be input after "_CRTIMP_ALTERNATIVE " in stdio.h RRS feed

  • 问题

  • 1>f:\program files\vc\include\stdio.h(288): error C2054: 在“_CRTIMP_ALTERNATIVE”之后应输入“(”
    1>f:\program files\vc\include\stdio.h(288): error C2085: “scanf_s”: 不在形参表中
    1>f:\program files\vc\include\stdio.h(290): error C2061: 语法错误: 标识符“_CRTIMP_ALTERNATIVE”
    1>f:\program files\vc\include\stdio.h(297): error C2054: 在“_CRTIMP_ALTERNATIVE”之后应输入“(”
    1>f:\program files\vc\include\stdio.h(297): error C2085: “_snprintf_s”: 不在形参表中
    1>f:\program files\vc\include\stdio.h(300): error C2061: 语法错误: 标识符“_CRTIMP_ALTERNATIVE”
    1>f:\program files\vc\include\stdio.h(309): error C2054: 在“_CRTIMP_ALTERNATIVE”之后应输入“(”
    1>f:\program files\vc\include\stdio.h(309): error C2085: “sscanf_s”: 不在形参表中
    1>f:\program files\vc\include\stdio.h(311): error C2061: 语法错误: 标识符“_CRTIMP_ALTERNATIVE”
    1>f:\program files\vc\include\stdio.h(314): error C2054: 在“_CRTIMP_ALTERNATIVE”之后应输入“(”
    1>f:\program files\vc\include\stdio.h(314): error C2085: “_snscanf_s”: 不在形参表中
    1>f:\program files\vc\include\stdio.h(315): error C2061: 语法错误: 标识符“_CRTIMP_ALTERNATIVE”
    1>f:\program files\vc\include\stdio.h(342): error C2054: 在“_CRTIMP_ALTERNATIVE”之后应输入“(”
    1>f:\program files\vc\include\stdio.h(342): error C2085: “_vsnprintf_s”: 不在形参表中
    1>f:\program files\vc\include\stdio.h(345): warning C4081: 应输入“)”;找到“字符串”
    1>f:\program files\vc\include\stdio.h(346): warning C4003: “__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_ARGLIST_EX”宏的实参不足
    1>f:\program files\vc\include\stdio.h(346): error C2085: “_snprintf”: 不在形参表中
    1>  “F:\Program Files\VC\bin\CL.exe”中的内部编译器错误
    1>    请选择 Visual C++
    1>  “帮助”菜单上的“技术支持”命令,或打开技术支持帮助文件来获得详细信息
    ========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
    2016年1月11日 15:19


  • Hi animy,

    Since your issue is about C++, I moved it to the C++ forum.

    Thanks for your understanding.

    Best Regards,

    Lake Xiao

    2016年1月13日 2:46
  • Hi animy

    “There doesn’t have any information about CRTIMP_ALTERNATIVE in stdio.h. So where is _CRTIMP_ALTERNATIVE declared? Do you add this manually? If yes, please check if there misses a “)” after CRTIMP_ALTERNATIVE or if the declaration format of CRTIMP_ALTERNATIVE  is wrong. Can you give us your project ? According to you error code, we can’t  find where specifically is wrong.

    Best Regards

    Hart Cheng

    2016年1月13日 7:17