编译unexpected end of file while looking for precompiled header directive的问题
来源:互联网 发布:win7系统优化教程 编辑:程序博客网 时间:2024/05/20 23:05
1.unexpected end of file while looking for precompiled header directive
A1、右键点工程名,选设置,然后选c/c++属性页,再选catagory选单中选 precompiled header ,将选项置成no use 或者autometic
A2、好像是工程中设置了预编译头文件,但你的程序中事实上没有添加这个头文件. 主要是stdafx.h Project Setting->C/C++ -> Category(Precompiled header)->not using Precompiled header试试
下面是msdn的说法: Fatal Error C1010 unexpected end of file while looking for precompiled header directive A precompiled header was specified, but it did not contain a precompiled header directive. This error can be caused by specifying an incorrect file as a header file, or by specifying an include file with the /Yu (Use Precompiled Header) command line option that is not listed in the source file as an include file.
注:http://hi.baidu.com/chinapegasus/blog/item/27ede14f949d5133afc3ab9a.html
2.
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 >
[Project] --> [Settings] --> 选择"Link"属性页, 在Project Options中将/subsystem:console改成/subsystem:windows
2. Console子系统设置错误, 提示: LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 >
控制台项目要使用Console子系统, 而不是Windows, 设置:
[Project] --> [Settings] --> 选择"Link"属性页, 在Project Options中将/subsystem:windows改成/subsystem:console
3. 程序入口设置错误, 提示: msvcrtd.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16
通常, MFC项目的程序入口函数是WinMain, 如果编译项目的Unicode版本, 程序入口必须改为wWinMainCRTStartup, 所以需要重新设置程序入口:
[Project] --> [Settings] --> 选择"Link"属性页, 在Category中选择Output, 再在Entry-point symbol中填入wWinMainCRTStartup, 即可
4. 线程运行时库设置错误, 提示: nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
这是因为MFC要使用多线程时库, 需要更改设置:
[Project] --> [Settings] --> 选择"C/C++"属性页, 在Category中选择Code Generation, 再在Use run-time library中选择Debug Multithreaded或者multithreaded 咸鱼游侠(75374355) 12:11:11 其中, Single-Threaded
单线程静态链接库(release版本) Multithreaded
多线程静态链接库(release版本) multithreaded DLL
多线程动态链接库(release版本) Debug Single-Threaded
单线程静态链接库(debug版本) Debug Multithreaded
多线程静态链接库(debug版本) Debug Multithreaded DLL
多线程动态链接库(debug版本)
单线程: 不需要多线程调用时, 多用在DOS环境下
多线程: 可以并发运行
静态库: 直接将库与程序Link, 可以脱离MFC库运行
动态库: 需要相应的DLL动态库, 程序才能运行
release版本: 正式发布时使用 debug版本: 调试阶段使用
- 编译unexpected end of file while looking for precompiled header directive的问题
- unexpected end of file while looking for precompiled header directive
- unexpected end of file while looking for precompiled header directive
- unexpected end of file while looking for precompiled header directive
- unexpected end of file while looking for precompiled header directive
- unexpected end of file while looking for precompiled header directive
- unexpected end of file while looking for precompiled header directive
- unexpected end of file while looking for precompiled header directive
- unexpected end of file while looking for precompiled header directive
- 出现此问题的解决方法: unexpected end of file while looking for precompiled header directive
- 如何解决unexpected end of file while looking for precompiled header directive的问题
- 如何解决unexpected end of file while looking for precompiled header directive的问题
- 如何解决unexpected end of file while looking for precompiled header directive的问题
- 如何解决unexpected end of file while looking for precompiled header directive的问题
- unexpected end of file while looking for precompiled header directive的问题
- 一个编译错误 fatal error C1010: unexpected end of file while looking for precompiled header directive
- 编译错误 fatal error C1010: unexpected end of file while looking for precompiled header directive
- VC++6.0中错误"unexpected end of file while looking for precompiled header directive"的解决方法。
- 电子支付:期待破冰
- 电子支付引领电子商务未来
- 对冲基金经理西蒙斯的奇迹
- Summary on 20080617: using forward or redirection in jsp and servlet
- 格雷欣法则
- 编译unexpected end of file while looking for precompiled header directive的问题
- 关于Babytree盈利模式探讨
- VoIP 技术究竟是什么?
- 关于网站体验营销
- 国内B2B电子商务网站经营模式比较与分析
- 加载多级部门代码
- 轰动全球的十大营销理念
- 慧聪、铭万对冲阿里巴巴
- Bye-- Czech golden generation