From: vikasvaish on
I am trying to compile ATL project but I get the following error:


Linking...

Searching libraries

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\winmm.lib:

Searching ..\CTIAdapterLib\Release\CTIAdapterLib.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\kernel32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\user32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\gdi32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\winspool.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\comdlg32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\advapi32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\shell32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\ole32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\oleaut32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\uuid.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\odbc32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\odbccp32.lib:

Searching \Development\Windows 800.0.0\CDSCallControlForWindows
\CTIAdapter\CTIAdapterLib\Release\CTIAdapterLib.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc
\lib\uafxcw.lib:

uafxcw.lib(dllmodul.obj) : error LNK2005: _DllMain(a)12 already defined
in CTIAdapter.obj

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\msvcrt.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\msimg32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\comctl32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\shlwapi.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\oledlg.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\urlmon.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc
\lib\atls.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\OLDNAMES.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\comsupp.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\msvcprt.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc
\lib\atl.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\wininet.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\ws2_32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\mswsock.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\oleacc.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\winmm.lib:

Searching ..\CTIAdapterLib\Release\CTIAdapterLib.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\kernel32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\user32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\gdi32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\winspool.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\comdlg32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\advapi32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\shell32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\ole32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\oleaut32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\uuid.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\odbc32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\odbccp32.lib:

Searching \Development\Windows 800.0.0\CDSCallControlForWindows
\CTIAdapter\CTIAdapterLib\Release\CTIAdapterLib.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc
\lib\uafxcw.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\msvcrt.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\msimg32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\comctl32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\shlwapi.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\oledlg.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\urlmon.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc
\lib\atls.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\OLDNAMES.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\comsupp.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\msvcprt.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc
\lib\atl.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\wininet.lib:

Searching C:\Program Files\Microso

ft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\ws2_32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\mswsock.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\oleacc.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\winmm.lib:

Searching ..\CTIAdapterLib\Release\CTIAdapterLib.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\kernel32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\user32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\gdi32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\winspool.lib:

Finished searching libraries

uafxcw.lib(dllmodul.obj) : warning LNK4006: _DllMain(a)12 already
defined in CTIAdapter.obj; second definition ignored

Creating library Release/CTIAdapter.lib and object Release/
CTIAdapter.exp

Searching libraries

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\winmm.lib:

Searching ..\CTIAdapterLib\Release\CTIAdapterLib.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\kernel32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\user32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\gdi32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\winspool.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\comdlg32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\advapi32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\shell32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\ole32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\oleaut32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\uuid.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\odbc32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\odbccp32.lib:

Searching \Development\Windows 800.0.0\CDSCallControlForWindows
\CTIAdapter\CTIAdapterLib\Release\CTIAdapterLib.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc
\lib\uafxcw.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\msvcrt.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\msimg32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\comctl32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\shlwapi.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\oledlg.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\urlmon.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc
\lib\atls.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\OLDNAMES.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\comsupp.lib:

Searching C:\

Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\msvcprt.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc
\lib\atl.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\wininet.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\ws2_32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\mswsock.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\oleacc.lib:

Finished searching libraries

Searching libraries

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\winmm.lib:

Searching ..\CTIAdapterLib\Release\CTIAdapterLib.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\kernel32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\user32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\gdi32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\winspool.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\comdlg32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\advapi32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\shell32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\ole32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\oleaut32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\uuid.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\odbc32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\odbccp32.lib:

Searching \Development\Windows 800.0.0\CDSCallControlForWindows
\CTIAdapter\CTIAdapterLib\Release\CTIAdapterLib.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc
\lib\uafxcw.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\msvcrt.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\msimg32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\comctl32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\shlwapi.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\oledlg.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\urlmon.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc
\lib\atls.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\OLDNAMES.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\comsupp.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\msvcprt.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc
\lib\atl.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\wininet.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\ws2_32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\mswsock.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\oleacc.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\winmm.lib:

Searching ..\CTIAdapterLib\Release\CTIAdapterLib.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
\kernel32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\user32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\gdi32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\winspool.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\comdlg32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\advapi32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\shell32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\ole32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\oleaut32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\uuid.lib:


Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\odbc32.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\lib\odbccp32.lib:

Searching \Development\Windows 800.0.0\CDSCallControlForWindows
\CTIAdapter\CTIAdapterLib\Release\CTIAdapterLib.lib:

Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc
\lib\uafxcw.lib:

Finished searching libraries

Microsoft (R) 32b/64b MIDL Compiler Version 6.00.0361

Copyright (c) Microsoft Corporation 1991-2002. All rights reserved.

Processing .\_CTIAdapter.idl

_CTIAdapter.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\mshtml.idl

mshtml.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\ocidl.idl

ocidl.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\oleidl.idl

oleidl.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\objidl.idl

objidl.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\unknwn.idl

unknwn.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\wtypes.idl

wtypes.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\basetsd.h

basetsd.h

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\guiddef.h

guiddef.h

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\oaidl.idl

oaidl.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\servprov.idl

servprov.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\urlmon.idl

urlmon.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\msxml.idl

msxml.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\dimm.idl

dimm.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\mshtmhst.idl

mshtmhst.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\docobj.idl

docobj.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\objsafe.idl

objsafe.idl

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\oaidl.acf

oaidl.acf

Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\ocidl.acf

ocidl.acf

uafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol
___wargv

uafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol
___argc

Release/CTIAdapter.dll : fatal error LNK1120: 2 unresolved externals

Build log was saved at "file://d:\Development\\CTIAdapter\CTIAdapter
\Release\BuildLog.htm"

CTIAdapter - 4 error(s), 6 warning(s)



---------------------- Done ----------------------

Build: 1 succeeded, 1 failed, 0 skipped





If I compile the project without including the <afxole.h> it compiles
OK without error. but I needed this file for COleMessageFilter in my
project.



Any Ideas!!!