当创建SDL工程发现“无法解析的外部符号 _SDL_main”出错
2017-07-04 20:53
281 查看
当你创建一个新控制台程序,想调用SDL时,编译时发现如下出错:
1>------ 已启动生成: 项目: caipal, 配置: Debug Win32 ------
1> caipal.cpp
1>SDLmain.lib(SDL_win32_main.obj) : error LNK2019: 无法解析的外部符号 _SDL_main,该符号在函数 _main 中被引用
1>E:\game\caipal\src\..\bin\caipalD.exe : fatal error LNK1120: 1 个无法解析的外部命令
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
这时,其实是main函数定义与sdl库里的不一样,比如:
int main()
这时编译时,就会出现上面的出错。需要修改为这样:
int main(int argc, char *argv[])
就没有这个出错了。
2. WiX安装工具的使用http://edu.csdn.net/course/detail/5207
3. 俄罗斯方块游戏开发
1>------ 已启动生成: 项目: caipal, 配置: Debug Win32 ------
1> caipal.cpp
1>SDLmain.lib(SDL_win32_main.obj) : error LNK2019: 无法解析的外部符号 _SDL_main,该符号在函数 _main 中被引用
1>E:\game\caipal\src\..\bin\caipalD.exe : fatal error LNK1120: 1 个无法解析的外部命令
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
这时,其实是main函数定义与sdl库里的不一样,比如:
int main()
这时编译时,就会出现上面的出错。需要修改为这样:
int main(int argc, char *argv[])
就没有这个出错了。
1. RPG游戏从入门到精通
http://edu.csdn.net/course/detail/52462. WiX安装工具的使用http://edu.csdn.net/course/detail/5207
3. 俄罗斯方块游戏开发
http://edu.csdn.net/course/detail/5110
4. boost库入门基础
http://edu.csdn.net/course/detail/5029
5.Arduino入门基础
http://edu.csdn.net/course/detail/4931
6.Unity5.x游戏基础入门
http://edu.csdn.net/course/detail/4810
7. TensorFlow API攻略
http://edu.csdn.net/course/detail/4495
8. TensorFlow入门基本教程
http://edu.csdn.net/course/detail/4369
9. C++标准模板库从入门到精通
http://edu.csdn.net/course/detail/3324
10.跟老菜鸟学C++
http://edu.csdn.net/course/detail/2901
11. 跟老菜鸟学python
http://edu.csdn.net/course/detail/2592
12. 在VC2015里学会使用tinyxml库
http://edu.csdn.net/course/detail/2590
13. 在Windows下SVN的版本管理与实战
http://edu.csdn.net/course/detail/2579
14.Visual Studio 2015开发C++程序的基本使用
http://edu.csdn.net/course/detail/2570
15.在VC2015里使用protobuf协议
http://edu.csdn.net/course/detail/2582
16.在VC2015里学会使用MySQL数据库
http://edu.csdn.net/course/detail/2672
相关文章推荐
- (在hello,MFC的创建过程中,新建项目时所配置的属性出现错误)error LNK2019: 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用 MSVCRTD.lib
- vs2005连接时出错拉 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用
- VC下使用SDL报“无法解析的外部符号 _SDL_main”
- error LNK2019: 无法解析的外部符号 _SDL_main,该符号在函数 _main_utf8 中被引用
- 使用SDL2出现 “error LNK2019: 无法解析的外部符号 _SDL_main,该符号在函数 _main 中被引用” 时的可能错误记录
- vs2005连接时出错拉 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用
- error LNK2019: 无法解析的外部符号 _SDL_main,该符号在函数 _main_utf8 中被引用
- windows配置SDL出现无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用
- SDL项目常见问题( error LNK2019: 无法解析的外部符号 _main ,该符号在函数 _mainCRTStartup 中被引用)
- windows配置SDL出现无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用
- SDL项目常见问题( error LNK2019: 无法解析的外部符号 _main ,该符号在函数 _mainCRTStartup 中被引用)
- 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用
- 无法解析的外部符号 __emul出错的解决方法
- 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用
- error LNK2019:: 无法解析的外部符号 _main ,该符号在函数 _mainCRTStartup 中被引用
- 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用
- error LNK2019: 无法解析的外部符号 __imp__InternetGetCookieA@16,该符号在函数 _main 中被引用
- 处理--->错误 error LNK2019: 无法解析的外部符号"~~~~" | 该符号"~~~"在函数 _main 中被引用
- 非MFC工程,采用静态链接MFc时,出现无法解析的外部符号CoInitialize
- 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用