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 期间失败: 文件无效或损坏 头痛万分,查了各种资料一 ...
随机推荐
- Jmeter远程启动负载机
1.负载机下载Jmeter,设置环境变量,jmeter中进行启动jmeter-server的应用服务.环境变量设置如下: 变量名:JMETER_HOME 变量值:C:\Program Files\ap ...
- [二十一]SpringBoot 之 导入xml配置
SpringBoot理念就是零配置编程,但是如果绝对需要使用XML的配置,我们建议您仍旧从一个@Configuration类开始,你可以使用@ImportResouce注解加载XML配置文件,我拿一个 ...
- BZOJ4951 Wf2017Money for Nothing(决策单调性)
按时间排序,显然可能存在于答案中的公司价格应该单调递减.然后就可以大胆猜想感性证明其有决策单调性.具体地,设f(i,j)表示第i个消费公司和第j个生产公司搭配的获利,f(i,j)=(ti-tj)*(c ...
- Find the hotel HDU - 3193(RMQ)
题意: 有n个旅馆,从这n个旅馆中找出若干个旅馆,使得这若干个旅馆满足这样的条件:不能从其它和剩下的旅馆中找到一个价格和距离都小于这个旅馆的旅馆... 解析: 按price 排序,若price相同, ...
- 【刷题】BZOJ 5249 [2018多省省队联测]IIIDX
Description [题目背景] Osu听过没?那是Konano最喜欢的一款音乐游戏,而他的梦想就是有一天自己也能做个独特酷炫的音乐游戏.现在,他在世界知名游戏公司KONMAI内工作,离他的梦想也 ...
- 【CF813E】Army Creation(主席树)
[CF813E]Army Creation(主席树) 题面 CF 洛谷 翻译 by ppl 见洛谷 题解 考虑最多只会有\(K\)个相同的数 那么,也就是说,如果一个数会被选 那么,和它相等的数中,在 ...
- 网站统计IP PV UV实现原理
网站流量统计可以帮助我们分析网站的访问和广告来访等数据,里面包含很多数据的,比如访问试用的系统,浏览器,ip归属地,访问时间,搜索引擎来源,广告效果等.原来是一样的,这次先实现了PV,UV,IP三个重 ...
- 【bzoj3811】【清华集训2014】玛里苟斯
3811: 玛里苟斯 Time Limit: 10 Sec Memory Limit: 256 MBSubmit: 500 Solved: 196[Submit][Status][Discuss] ...
- 【数学】【背包】【NOIP2018】P5020 货币系统
传送门 Description 在网友的国度中共有 \(n\) 种不同面额的货币,第 \(i\) 种货币的面额为 \(a[i]\),你可以假设每一种货币都有无穷多张.为了方便,我们把货币种数为 \(n ...
- [DeeplearningAI笔记]卷积神经网络2.2经典网络
4.2深度卷积网络 觉得有用的话,欢迎一起讨论相互学习~Follow Me 参考文献 [LeNet]--Lécun Y, Bottou L, Bengio Y, et al. Gradient-bas ...