VC error link
错误1:
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
在project-setting-link里找到project options 去掉里面的/subsystem:console
错误2:
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endt...
将工程设置为Using MFC in a static library
错误3:
libcmtd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
在project-setting-link里找到project options 将里面的/subsystem:console 改为/subsystem:windows
错误4:
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
错误5:
nafxcw.lib(doccore.obj) : error LNK2001: unresolved external symbol
解答:
这个要用到多线程的库 编译选项里加 /MT
程序是多线程的,用alt+F7设定编译选项,在C++选项卡里面把project option里的/MLd改为/MTd
或者在category里面选择code generation,把运行时库改为多线程debug版
原因是这个程序使用了一些mfc的类,而mfc内部运作是多线程的。你用vc6新建的win32程序工程默认是不使用mfc,不使用多线程的,所以不能编译成功
VC error link的更多相关文章
- error TRK0002: Microsoft Visual Studio 10.0\VC\bin\link.exe Access is denied.
When you compile project, visual studio 2010 prompts “…link.exe … Access is denied” This below is I ...
- Error 'LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or cor
转自:http://blog.csdn.net/junjiehe/article/details/16888197 采用红字方法可行,后来采用cmake生成sln文件时,又出现了该问题,采用了玫红色字 ...
- error link 2019 waveout
winmm.lib的影响 在做音频播放的时候使用到了win系统音频函数waveout; 但是报错: error link 2019 无法解析外部符号:waveoutGetnumDevice /clos ...
- 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 ...
- VC中LINK 2001 和 LINK 2009 的错误的解决
最近将两个开源C++项目编译成windows版本的时候遇到很多问题,关键是两个项目经过同事的修改之后,一个项目引用了另一个项目,两个项目的头文件中都有一些跨平台的关于数据类型,以及一些通用函数的定义, ...
- VC error LNK2005 解决办法
error LNK2005: "int __cdecl VerifyVMR9(void)" (?VerifyVMR9@@YAHXZ) 解决办法 在 属性->配置属性-> ...
- VC++ : error LNK2005: ... already defined in *.obj
今天写代码遇到了这么一个链接错误:"已经在*.obj中定义". error LNK2005: "void __cdecl ReplaceWstringVar(class ...
- VC++ : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>
最近学习Google Breakpad,将其用在了自己的项目中,编译的版本为VS2010,没有什么问题.但是为了和之前的程序兼容,需要使用VS2008版本的程序,于是又编译了VS2008版本的代码,但 ...
- VC++ error C2248: “CObject::CObject”: 无法访问 private 成员(在“CObject”类中声明)
在使用诸如:CArray或是 CList等类时,经常会出现此错误 此错误的原因是由于自定义的类的数组项时 有一个操作如 Add() 在这个操作中,实际上需要一个 = 操作,但是这个 =操作在 自定 ...
随机推荐
- C#解决System.Security.Cryptography.MD5.Create()调用的目标发生了异常)的问题
今天搭建微信扫码支付环境的时候,一样的配置参数,调用连接提示错误 错误:调用的目标发生了异常 然后跟踪到执行 MD5 md5 = System.Security.Cryptography.MD5.Cr ...
- window.location.href和window.top.location.href的区别
if (window.location.href == window.top.location.href) { window.top.location.href = "/index. ...
- HDU1788 Chinese remainder theorem again【中国剩余定理】
题目链接: pid=1788">http://acm.hdu.edu.cn/showproblem.php?pid=1788 题目大意: 题眼下边的描写叙述是多余的... 一个正整N除 ...
- leetCode 85.Maximal Rectangle (最大矩阵) 解题思路和方法
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and ...
- LaTeX Subfigure 中间加入垂直线
近期论文用到这个效果. 先实现下, 嘿嘿. \documentclass{article} \usepackage{tikz,lscape,amsmath} \usepackage[margin=1c ...
- findFocus-获得拥有焦点的控件
所有的view控件有一个findFocus方法,这个方法如下 /** * Find the view in the hierarchy rooted at this view that current ...
- 全面了解Linux下Proc文件系统
全面了解Linux下Proc文件系统 Proc是一个虚拟文件系统,在Linux系统中它被挂载于/proc目录之上.Proc有多个功能 ,这其中包括用户可以通过它访问内核信息或用于排错,这其中一个非 ...
- atime&&mtime&&ctime区别
- hdu 6170
dp: http://blog.csdn.net/qq_28954601/article/details/77484676 #include <bits/stdc++.h> #define ...
- 抓包神器Fiddler之Https请求随心转
随着AppleStore对APP的审核越来越严格,客户端请求服务端API的方式大多数都变更为了https,在更安全的同时又引起了另外一个问题——本地抓包开发调试的不便. 一般来说,我们在开发API的时 ...