我用ATL做一个EXE组件,
添加的对象是支持FREE线程模型,COSTOM接口类型。
DEBUG版本顺利编译连接通过,调试效果也好,但当我改为Release版本重新编译连接的时候出现了连接错误,不知哪位能帮忙解决一下,先谢了!!!错误如下:
--------------------Configuration: CalBmCOM - Win32 Release MinDependency--------------------
</h3>
<h3>Command Lines</h3>
Creating command line "midl.exe /tlb ".\CalBmCOM.tlb" /h "CalBmCOM.h" /iid "CalBmCOM_i.c" /Oicf "E:\EXAM-VC\simulation\CalBmCOM\CalBmCOM.idl""
Creating command line "rc.exe /l 0x804 /fo"ReleaseMinDependency/CalBmCOM.res" /d "NDEBUG" "E:\EXAM-VC\simulation\CalBmCOM\CalBmCOM.rc"" 
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP126.tmp" with contents
[
/nologo /ML /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Fp"ReleaseMinDependency/CalBmCOM.pch" /Yu"stdafx.h" /Fo"ReleaseMinDependency/" /Fd"ReleaseMinDependency/" /FD /c 
"E:\EXAM-VC\simulation\CalBmCOM\CalBmCOM.cpp"
"E:\EXAM-VC\simulation\CalBmCOM\MyCalBm.cpp"
]
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP126.tmp" 
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP127.tmp" with contents
[
/nologo /ML /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Fp"ReleaseMinDependency/CalBmCOM.pch" /Yc"stdafx.h" /Fo"ReleaseMinDependency/" /Fd"ReleaseMinDependency/" /FD /c 
"E:\EXAM-VC\simulation\CalBmCOM\StdAfx.cpp"
]
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP127.tmp" 
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP128.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no /pdb:"ReleaseMinDependency/CalBmCOM.pdb" /machine:I386 /out:"ReleaseMinDependency/CalBmCOM.exe" 
".\ReleaseMinDependency\StdAfx.obj"
".\ReleaseMinDependency\CalBmCOM.obj"
".\ReleaseMinDependency\CalBmCOM.res"
".\ReleaseMinDependency\MyCalBm.obj"
]
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP128.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP129.bat" with contents
[
@echo off
".\ReleaseMinDependency\CalBmCOM.exe" /RegServer
echo regsvr32 exec. time > ".\ReleaseMinDependency\regsvr32.trg"
echo Server registration done!
]
Creating command line "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP129.bat"
Creating Type Library...
Microsoft (R) MIDL Compiler Version 5.01.0164  
Copyright (c) Microsoft Corp 1991-1997. All rights reserved.
Processing E:\EXAM-VC\simulation\CalBmCOM\CalBmCOM.idl
CalBmCOM.idl
Processing C:\Microsoft Visual Studio\VC98\INCLUDE\oaidl.idl
oaidl.idl
Processing C:\Microsoft Visual Studio\VC98\INCLUDE\objidl.idl
objidl.idl
Processing C:\Microsoft Visual Studio\VC98\INCLUDE\unknwn.idl
unknwn.idl
Processing C:\Microsoft Visual Studio\VC98\INCLUDE\wtypes.idl
wtypes.idl
Processing C:\Microsoft Visual Studio\VC98\INCLUDE\ocidl.idl
ocidl.idl
Processing C:\Microsoft Visual Studio\VC98\INCLUDE\oleidl.idl
oleidl.idl
Processing C:\Microsoft Visual Studio\VC98\INCLUDE\servprov.idl
servprov.idl
Processing C:\Microsoft Visual Studio\VC98\INCLUDE\urlmon.idl
urlmon.idl
Processing C:\Microsoft Visual Studio\VC98\INCLUDE\msxml.idl
msxml.idl
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
CalBmCOM.cpp
MyCalBm.cpp
Generating Code...
Linking...
LIBC.lib(fpinit.obj) : error LNK2005: __fltused already defined in StdAfx.obj
LIBC.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseMinDependency/CalBmCOM.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.