Linking...
Creating library ReleaseUMinDependency/TestEvent.lib and object ReleaseUMinDependency/TestEvent.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseUMinDependency/TestEvent.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.我用ATL作了一个com 组件。 dubug 时没错,但release 出现以上错误。projecct->settings中link->import 中的object/library modules 也检查过了。请大师指教
Creating library ReleaseUMinDependency/TestEvent.lib and object ReleaseUMinDependency/TestEvent.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseUMinDependency/TestEvent.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.我用ATL作了一个com 组件。 dubug 时没错,但release 出现以上错误。projecct->settings中link->import 中的object/library modules 也检查过了。请大师指教
解决方案 »
- 书下载的店销售管理系统有错误,请帮忙修改下
- 2年半工作经验在广州找vc++方面的5天制工作,试用期3500,有全额工资保险,有正常加班费,请问这样的工作好找吗?
- 请教EQ算法?
- 在多重视图中 怎样使一类文档只能创建一份?
- 我要动态改变CEdit的ReadOnly, 而不是在Create时改, 怎么做?
- 请教:怎样使开机启动的程序最早启动?
- 初学WIN32 SDK编程~有哪位达人能提供一些C语言编写WIN32应用程序的网站或源码
- 急,请各位高手帮忙
- CListctrl 问题
- 请教抓取页面问题~
- 有语言开发方面的高手请进~~~~~~~~~~~~~~~~~~~~~
- 请推荐学习VC++的书籍,何处有VC++的免费电子书
将/subsystem:windows 改为: subsystem:console
建立日期: 2000年6月22日 最后修改日期:2000年6月22日
所属类别: C/C++ - 错误信息 Wanghongbo:
操作系统: Windows 98
编程工具: VC 98
问题: 各位高手:
我创建了一个ATL工程,加入了一些代码,编译时得到如下错误信息:
Linking...
Creating library ReleaseMinSize/mail.lib and object ReleaseMinSize/mail.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
不知是何原因,请指教!
水平: 中级 回答: 你肯定在程序中使用了一些标准的C语言函数,如mem*函数。如果你想知道到底是哪个函数,可以在工程设置的ignore libraries中输入Libcmt.lib。再次链接时,会报告一些函数找不到,你就可以知道是哪些函数了。如果这些函数是必须的,解决的办法就是从工程设置中删除_ATL_MIN_CRT。
/D "_ATL_MIN_CRT" <-------------这个
/Fp"ReleaseMinSize/TaSk_5_6.pch" /Yu"stdafx.h" /Fo"ReleaseMinSize/" /Fd"ReleaseMinSize/" /FD /c
闻怡洋 EMail: [email protected] homepage: http://vchelp.163.net --------------------------------------------------------------------------------
在VC中当整个工程较大时,软件时常为出现在DEBUG状态下能运行而在RELEASE状态下无法运行的情况。由于开发者通常在DEBUG状态下开发软件,所以这种情况时常是在我们辛苦工作一两个月后,满怀信心的准备将软件发行时发生。为了避免无谓的损失,我们最好进行以下的检查:1、时常测试软件的两种版本。2、不要轻易将问题归结为DEBUG/RELEASE问题,除非你已经充分对两种版本进行了测试。3、预处理的不同,也有可能引起这样的问题。
出现问题的一种可能性是在不同版本的编译间定义了不同的预处理标记。请对你的DEBUG版本的软件试一下以下改动: 在"Project Setting(ALT-F7)" 中的C/C++项中设置目录(category)为"General",并且改动"_DEBUG"定义为"NDEBUG".
**************************************************************************
设置目录为"Preprocessor"并且添加定义"_DEBUG到"Undefined Symbols"输入框.
选择Rebuild ALL,重新编译.
**************************************************************************
如果经过编译的程序产生了问题,请对代码进行如下改动:
将ASSERT() 改为 VERIFY().
找出定义在"#ifdef _DEBUG"中的代码,如果在RELEASE版本中需要这些代码请将他们移到定义外。
查找TRACE(...)中代码,因为这些代码在RELEASE中也不被编译。
所以请认真检查那些在RELEASE中需要的代码是否并没有被便宜。
4、变量的初始化所带来的不同,在不同的系统,或是在DEBUG/RELEASE版本间都存在这样的差异,所以请对变量进行初始化。 5、是否在编译时已经有了警告?请将警告级别设置为3或4,然后保证在编译时没有警告出现. 6、是否改动了资源文件. 7、此外对RELEASE版本的软件也可以进行调试,请做如下改动: 在"Project Settings" 中 "C++/C " 项目下设置 "category" 为 "General" 并且将"Debug Info"设置为 "Program Database".
在"Link"项目下选中"Generate Debug Info"检查框。
"Rebuild All"
如此做法会产生的一些限制:
无法获得在MFC DLL中的变量的值。
必须对该软件所使用的所有DLL工程都进行改动。
另:
MS BUG:MS的一份技术文档中表明,在VC5中对于DLL的"Maximize Speed"优化选项并未被完全支持,因此这将会引起内存错误并导致程序崩溃。
选择Rebuild ALL,重新编译.
什么操作系统?
ReleaseUMinDependency应该是Unicode吧,nt和2000才支持啊
comsupp.lib(comutil.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
ControlBack.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
FilterManagerEvents.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
FMInterface.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
TestEvent.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
TestEvent.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
comsupp.lib(comraise.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
ControlBack.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
FilterManagerEvents.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
FMInterface.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
StdAfx.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
CRegistry.obj : error LNK2001: unresolved external symbol _wcslen
comsupp.lib(comutil.obj) : error LNK2001: unresolved external symbol _wcslen
CRegistry.obj : error LNK2001: unresolved external symbol _wcscpy
FilterManagerEvents.obj : error LNK2001: unresolved external symbol _sprintf
FilterManagerEvents.obj : error LNK2001: unresolved external symbol _memset
FMInterface.obj : error LNK2001: unresolved external symbol _memset
TestEvent.obj : error LNK2001: unresolved external symbol _memset
FMInterface.obj : error LNK2001: unresolved external symbol _fflush
FMInterface.obj : error LNK2001: unresolved external symbol _fwprintf
FMInterface.obj : error LNK2001: unresolved external symbol __wfopen
FMInterface.obj : error LNK2001: unresolved external symbol _fclose
FMInterface.obj : error LNK2001: unresolved external symbol __sleep
FMInterface.obj : error LNK2001: unresolved external symbol __fltused
FMInterface.obj : error LNK2001: unresolved external symbol __ftol
FMInterface.obj : error LNK2001: unresolved external symbol _strcmp
FMInterface.obj : error LNK2001: unresolved external symbol _abs
FMInterface.obj : error LNK2001: unresolved external symbol _memcpy
TestEvent.obj : error LNK2001: unresolved external symbol _memcpy
FMInterface.obj : error LNK2001: unresolved external symbol _strcpy
FMInterface.obj : error LNK2001: unresolved external symbol __alloca_probe
TestEvent.obj : error LNK2001: unresolved external symbol __alloca_probe
comsupp.lib(comsupp.obj) : error LNK2001: unresolved external symbol __alloca_probe
comsupp.lib(comutil.obj) : error LNK2001: unresolved external symbol __alloca_probe
FMInterface.obj : error LNK2001: unresolved external symbol _atoi
FMInterface.obj : error LNK2001: unresolved external symbol _memcmp
TestEvent.obj : error LNK2001: unresolved external symbol _memcmp
TestEvent.obj : error LNK2001: unresolved external symbol __purecall
TestEvent.obj : error LNK2001: unresolved external symbol _free
TestEvent.obj : error LNK2001: unresolved external symbol _malloc
TestEvent.obj : error LNK2001: unresolved external symbol _realloc
TestEvent.obj : error LNK2001: unresolved external symbol __chkstk
LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
comsupp.lib(comutil.obj) : error LNK2001: unresolved external symbol _atexit
comsupp.lib(comraise.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
comsupp.lib(comraise.obj) : error LNK2001: unresolved external symbol __CxxThrowException@8
ReleaseUMinDependency/TestEvent.dll : fatal error LNK1120: 29 unresolved externals
忘了改回去