Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / January 2008

Tip: Looking for answers? Try searching our database.

Linking error of CxxFrameHandler3

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Angela Yan - 22 Jan 2008 09:39 GMT
Hi all,

I have a dll compiled using DDK 3790.1218 WNet environment. Everything works
fine until recently I need to link a Lib file that is complied using C++ in
VS2005. After I add the Lib file in my DLL's sources file, I have the
following linking error.

1>1>ABC_mt.lib(ABCs.obj) : error LNK2019: unresolved external symbol
__vswprintf referenced in function "int __cdecl swprintf(unsigned short
*,unsigned short const *,...)" (?swprintf@@YAHPAGPBGZZ)
1>1>ABC_mt.lib(ABCs.obj) : error LNK2019: unresolved external symbol
___CxxFrameHandler3 referenced in function __ehhandler$?MD5String@@YAXPAD0@Z

Part of the linking configuration of the DLL sources files:

TARGETTYPE = DYNLINK
TARGETPATH = bin$(BUILD_ALT_DIR)
TARGETEXT  = dll
DLLENTRY   = _DllMainCRTStartup
.......

INCLUDES = $(DDK_INC_PATH);$(SDK_INC_PATH);..\Include;..\IDL;..

TARGETLIBS = $(DDK_LIB_PATH)\portcls.lib   \
            $(DDK_LIB_PATH)\stdunk.lib    \
            $(DDK_LIB_PATH)\libcntpr.lib  \
            $(DDK_LIB_PATH)\kernel32.lib  \
            $(DDK_LIB_PATH)\user32.lib    \
            $(DDK_LIB_PATH)\advapi32.lib  \
            $(DDK_LIB_PATH)\winmm.lib     \
            $(DDK_LIB_PATH)\version.lib   \
            $(DDK_LIB_PATH)\uuid.lib      \
            $(DDK_LIB_PATH)\ole32.lib     \
            $(DDK_LIB_PATH)\oleaut32.lib  \
            $(DDK_LIB_PATH)\hid.lib       \
            $(DDK_LIB_PATH)\dsound.lib    \
            $(DDK_LIB_PATH)\setupapi.lib  \
            $(DDK_LIB_PATH)\strsafe.lib   \
            $(DDK_LIB_PATH)\SHFolder.lib  \
            $(DDK_LIB_PATH)\shell32.lib   \
   $(DDK_LIB_PATH)\iphlpapi.lib  \
   $(DDK_LIB_PATH)\shlwapi.lib   \
     IHLSDK\lib\ABC_MT.lib

USE_MSVCRT = 1
USE_STATIC_ATL = 1
ATL_VER = 30

MSC_WARNING_LEVEL = $(MSC_WARNING_LEVEL) -WX

C_DEFINES = $(CFASTFLAGS) $(C_DEFINES) -DWIN32 -D_MERGE_DEVCON32_ -D_USRDLL
C_DEFINES = $(C_DEFINES) -DNDEBUG -D_WINDOWS

Commands for the Lib file in VS2005:

C/C++ command line:
/O2 /Ob1 /I "..\APO\\" /I ".\\" /D "_APO" /D "WIN32" /D "NDEBUG" /D
"UNICODE" /D "_LIB" /D "IHLICENSE_EXPORTS" /D "_VC80_UPGRADE=0x0600" /D
"_UNICODE" /D "_ATL_STATIC_REGISTRY" /GF /FD /EHsc /MT /Gy /Zc:wchar_t-
/Yu"stdafx.h" /Fp"C:\WUTemp\Dump\IHLic/IHLicense.pch"
/Fo"C:\WUTemp\Dump\IHLic/" /Fd"C:\WUTemp\Dump\IHLic/" /FR"APO_MT\\" /W3
/nologo /c /TP /errorReport:prompt

Librarian command line:
/OUT:"APO\APOIHLObj_MT.lib" /NOLOGO /NODEFAULTLIB

Any help is appreciated.

Thank you.

Angela
Ben Voigt [C++ MVP] - 31 Jan 2008 23:12 GMT
> Hi all,
>
> I have a dll compiled using DDK 3790.1218 WNet environment. Everything
> works fine until recently I need to link a Lib file that is complied using
> C++ in VS2005. After I add the Lib file in my DLL's sources file, I have
> the following linking error.

Is this kernel mode or user mode?

Kernel mode components should be compiled and linked using the DDK build
environment.  User mode components can be compiled with the DDK compiler and
headers then linked into DLLs and applications using other compilers.  In
general you can't use standard C++ in kernel mode because C++ needs a
runtime library that isn't present, however there are kernel mode versions
of the runtime library that allow some subset of C++.  For user mode it
should be no problem, but use the VS2005 linker and runtime library to link
together the C++ and DDK compiled object files.

> 1>1>ABC_mt.lib(ABCs.obj) : error LNK2019: unresolved external symbol
> __vswprintf referenced in function "int __cdecl swprintf(unsigned short
[quoted text clipped - 62 lines]
>
> Angela

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.