sdl 设置 Visual Studio 2010
我无法启动并运行 sdl。我包含了包含文件夹、库文件夹
,这是代码
#include <SDL.h>
int main()
{
if (SDL_Init(SDL_INIT_VIDEO)==-1)
{
return 1;
}
SDL_Quit();
return 0;
}
我做错了什么?
它给了我这个错误消息
Error 1 error LNK2019: unresolved external symbol _SDL_main referenced in function _main c:\Users\user1\documents\visual studio 2010\Projects\Sdl Test 1\Sdl Test 1\SDLmain.lib(SDL_win32_main.obj) Sdl Test 1
Error 2 error LNK1120: 1 unresolved externals c:\users\user1\documents\visual studio 2010\Projects\Sdl Test 1\Debug\Sdl Test 1.exe 1 1 Sdl Test 1
编辑:我让它工作这是因为我没有使用这个
int main(int argc, char* argv[])
I can not get sdl up and running. I included the include folder, the library folder
and here is the code
#include <SDL.h>
int main()
{
if (SDL_Init(SDL_INIT_VIDEO)==-1)
{
return 1;
}
SDL_Quit();
return 0;
}
what am i doing wrong?
It gives me this error message
Error 1 error LNK2019: unresolved external symbol _SDL_main referenced in function _main c:\Users\user1\documents\visual studio 2010\Projects\Sdl Test 1\Sdl Test 1\SDLmain.lib(SDL_win32_main.obj) Sdl Test 1
Error 2 error LNK1120: 1 unresolved externals c:\users\user1\documents\visual studio 2010\Projects\Sdl Test 1\Debug\Sdl Test 1.exe 1 1 Sdl Test 1
EDIT: I got it working It is because I did not use this
int main(int argc, char* argv[])
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编辑:我让它工作了这是因为我没有使用这个
int main(int argc, char* argv[])
EDIT: I got it working It is because I did not use this
int main(int argc, char* argv[])