ERROR in vc 6.0 (LINK : fatal error LNK1561: entry point must be defined)
导致错误 LINK : fatal error LNK1561: entry point must be defined 的原因有很多种, 网上可以搜到很多,
一般是函数入口没定义, 或者修改为/subsystem:windows /entry:mainCRTStartup,
或者使用下面的语句:
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
这里我碰到的情况比较特别, 我的是一个VC 6.0的静态lib工程(VC 2008上编译正常), 竟然报入口点没定义, 奇怪吧.
而且Release版本编译正常, 错误仅出现在Debug版, 尝试了各种方法都解决不了.
最后搜索到下面这个帖子, 里面有个回复提到一个MSDN的kb, 尝试了一下, 结果解决了, 这种情况非常少见, 希望对你有用.
参考: http://bbs.csdn.net/topics/337691
在36楼的回复:
PRB: Missing /c Compiler Option Causes LNK1561 Linker Error
Q228455
--------------------------------------------------------------------------------
The information in this article applies to:
Microsoft Visual C++, 32-bit Editions, version 6.0
--------------------------------------------------------------------------------
SYMPTOMS
When compiling a multiple source file project that creates a pre-compiled header file inside the Visual C++ Integrated Development Environment (IDE), the following error can occur:
Compiling...
StdAfx.cpp
LINK : fatal error LNK1561: entry point must be defined
Error executing cl.exe.
NOTE: The linker error is generated during the compiler phase of the build.
CAUSE
The /c compiler option is missing from the build settings.
RESOLUTION
Add /c to the compiler options. To do this, you must edit the compiler options in the Project Options box in the C/C++ tab under Project Settings.
NOTE: This box is only editable if the whole project is selected in the tree control on the Project Settings.
STATUS
This behavior is by design.
MORE INFORMATION
By default, the Visual C/C++ compiler attempts to compile and link in a single step. The /c (Compile without Linking) option is used to tell the compiler to compile only. Since Visual C++ compiles and links in separate steps, then /c is required for all Visual C++ builds.
To reproduce the error, create a default MFC project and remove the /c option from the Project Settings by editing the compiler options in the Project Options box in the C/C++ tab under Project Settings.
REFERENCES
© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Kelly Marie Ward, Microsoft Corporation
Additional query words:
Keywords : kbCompiler kbLinker kbVC600
Issue type : kbprb
Technology : kbvc
Last Reviewed: February 4, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.
ERROR in vc 6.0 (LINK : fatal error LNK1561: entry point must be defined)的更多相关文章
- VC++ 链接错误LINK : fatal error LNK1104: cannot open file "*.lib"
问题描述: 运行VC++编译时经常出现 Linking… LINK : fatal error LNK1104: cannot open file “*.lib” Error executing li ...
- pydensecrf安装报错1、UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 29: invalid start byte2、 LINK : fatal error LNK1158: 无法运行“rc.exe” error: command 'D:\\software\\vs2015\\VC\\BIN
pydensecrf安装报错 1.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 29: invalid st ...
- LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
同时安装了VS2012和VS2010,用VS2010 时 >LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏 问题说明:当安装VS2012之后 ...
- 错误提示:LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt 的解决方法
最近在win7 系统下,打算利用 cmake 生成项目文件,然后用vs2010进行编译.但是在cmake的时候出现错误弹窗:
- 解决“LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏”问题
更新VS2010,或者卸载VS2013安装2010后,建立项目时会出现"LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏"的错误 ...
- LinkIssue: Error 'LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or cor
参考:http://blog.csdn.net/junjiehe/article/details/16888197 使用VisualStudio 编译链接中可能出现如下错误: LINK : fatal ...
- vs2010 问题 LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
vs2010 问题 LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏 在安装 VS2010 后,再安装 VS2012 VS2015 等,原来的 .N ...
- [转]LINK:fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
LINK:fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏 原文地址:http://yacare.iteye.com/blog/2010049 很多伙伴在更新VS ...
- 彻底解决 LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
最近我的VS2010不知道怎么回事,平时用的好好的,近期竟然出现了所谓的 LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏 头痛万分,查了各种资料一 ...
随机推荐
- 洛谷 P1678 烦恼的高考志愿
题目背景 计算机竞赛小组的神牛V神终于结束了万恶的高考,然而作为班长的他还不能闲下来,班主任老t给了他一个艰巨的任务:帮同学找出最合理的大学填报方案.可是v神太忙了,身后还有一群小姑娘等着和他约会,于 ...
- HDU-3974 Assign the task题解报告【dfs序+线段树】
There is a company that has N employees(numbered from 1 to N),every employee in the company has a im ...
- Django summernote 富文本
Summernote is a simple WYSIWYG editor. GITHUB:https://github.com/summernote/django-summernote SETUP ...
- poj 1185 状态压缩
炮兵阵地 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 27926 Accepted: 10805 Descriptio ...
- python并行编程学习之并行计算存储体系结构
基于指令和可被同时处理的存储单元的数目,计算机系统可以分为以下四种类目: 单指令,单数据单元(SISD)在该体系结构中,计算机是单处理器机器,一次只能用单一的指令来操作单一的数据流.在SISD中,机器 ...
- C++ ------ static_cast,dynamic_cast,reinterpret_cast,const_cast
C++类型转换分为:隐式类型转换和显式类型转换 第1部分. 隐式类型转换 又称为“标准转换”,包括以下几种情况:1) 算术转换(Arithmetic conversion) : 在混合类型的算术表达式 ...
- 微信小程序,页面分享
onShareAppMessage: function () { return { title: '微信小程序联盟', desc: '最具人气的小程序开发联盟!', path: '/page/user ...
- JS事件大全及兼容
一般事件 事件 浏览器支持 描述 onClick IE3|N2|O3 鼠标点击事件,多用在某个对象控制的范围内的鼠标点击 onDblClick IE4|N4|O 鼠标双击事件 onMouseDown ...
- extjs grid demo
Ext.onReady(function () { var store = Ext.create('Ext.data.Store', { fields: ['id', 'name', 'account ...
- Windows API函数大全(精心总结)
WindowsAPI函数大全(精心总结) 目录 1. API之网络函数... 1 2. API之消息函数... 1 3. API之文件处理函数... 2 4. API之打印函数... 5 5. ...