本文介绍了如何修复SDL 2.0.3在Visual Studio 2015预览未解决的外部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我得到以下错误:
1>SDL2main.lib(SDL_windows_main.obj) : error LNK2019: unresolved external symbol __imp__fprintf referenced in function _ShowError
1>SDL2main.lib(SDL_windows_main.obj) : error LNK2019: unresolved external symbol __imp____iob_func referenced in function _ShowError
我的代码就是:
#include <iostream>
#include "SDL2\SDL.h"
int main(int argc, char* argv[])
{
std::cout << "Hello World!" << std::endl;
return 0;
}
我已经链接库正确,这在VS2012正常,但由于某种原因不会编译在vs2015。
i've linked the libraries correctly, and this works fine in vs2012, but for some reason won't compile in vs2015.
推荐答案
我有与SDL 1.2相同的问题 - 解决方案对我来说是下载SDL源和构建lib VS 2015。当我链接到新(VS2015)建立的libs - 也许有人应该尝试相同的SDL 2(从源代码重建lib)问题修复?
I had the same issue with SDL 1.2 - the solution that worked for me was to download SDL source and build the lib with VS 2015. The problem was fixed when I linked to the newly (VS2015) built libs - maybe someone should try the same for SDL 2 (rebuild lib from source)?
这篇关于如何修复SDL 2.0.3在Visual Studio 2015预览未解决的外部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!