【发布时间】:2025-12-11 09:35:01
【问题描述】:
我正在尝试安装 SDL,但它不断在视觉上显示此错误 工作室 2013,有什么建议吗?
//Code
#include <SDL\SDL.h>
int main(int argc, char** argv){
SDL_Init(SDL_INIT_EVERYTHING);
return 0;
}
//Error
//1>------ Build started: Project: Graphics, Configuration: Debug Win32 ------
//1>LINK : fatal error LNK1104: cannot open file 'SDL2.obj'
//========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
【问题讨论】:
-
这是链接错误。请在链接属性中指定 SDL2 的路径
-
我检查了输入选项卡中的其他依赖项,我有以下内容:SDL2 SDL2main
-
这是我在 Project->Linker->Input->Additional Dependencies 中检查的更理解的评论,发现 SDL2;SDL2;main;%(AdditionalDependencies)
标签: c++ compiler-errors