场景:
windows下visualstudio编译sdl2为静态库
问题:
sdl2demo例子使用时,出现
__fltused already defined in LIBCMTD.lib c++ linker error LNK2005 already defined in SDL2
解决方案:
编译sdl2静态库时,设定宏开关:#define HAVE_LIBC 1
VisualStudio编译则在Processor中设定
或
编译前,修改sdl2\include\sdl2_config.h,添加:#define HAVE_LIBC 1