Undefined reference to `__ms_vsnprintf' when linking GLFW statically

后端 未结 3 724
失恋的感觉
失恋的感觉 2020-12-18 11:39

I am trying to compile the GLFW quickstart guide (Here) in windows 8 64-bit using mingw. I am using the official 32 bit windows binary from the glfw website.

Everyth

3条回答
  •  甜味超标
    2020-12-18 12:02

    MinGW\include\stdio.h:

    /* The following pair ALWAYS refer to the MSVCRT implementations...
     */
    _CRTIMP int __cdecl __MINGW_NOTHROW _snprintf (char*, size_t, const char*, ...);
    _CRTIMP int __cdecl __MINGW_NOTHROW _vsnprintf (char*, size_t, const char*, __VALIST);
    _CRTIMP int __cdecl __MINGW_NOTHROW _vscprintf (const char*, __VALIST);
    

    So just use them with underscore in front of them.

提交回复
热议问题