Home Help Center

Create MFC DLL error

jyqjyq Member jiangyueqingOrganization: sunway co.Project: lotto manager
I can run demo "Hello" in \Ice-3.0.1-VC60\demo\Ice\Hello properly.

I want to create a MFC DLL, for other application (not in C++/java)to invoke ice service.

So, I used the MFC dll wizard and included the slice definition and ICE headers. When I compile it, i'm getting the following error:

Performing Custom Build Step on .\Hello.ice
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
Client.cpp
hello.cpp
mydll.cpp
d:\ice-3.0.1-vc60\include\stlport\stl\debug\_debug.h(166) : warning C4005: '_STLP_DEBUG_CHECK' : macro redefinition
d:\ice-3.0.1-vc60\include\stlport\stl\_config.h(375) : see previous definition of '_STLP_DEBUG_CHECK'
d:\ice-3.0.1-vc60\include\stlport\stl\debug\_debug.h(167) : warning C4005: '_STLP_DEBUG_DO' : macro redefinition
d:\ice-3.0.1-vc60\include\stlport\stl\_config.h(376) : see previous definition of '_STLP_DEBUG_DO'
d:\ice-3.0.1-vc60\include\stlport\stl\debug\_vector.h(277) : error C2953: 'vector' : template class has already been defined
d:\ice-3.0.1-vc60\include\stlport\stl\debug\_vector.h(277) : see declaration of 'vector'
d:\ice-3.0.1-vc60\include\iceutil\mutex.h(141) : error C2065: 'TryEnterCriticalSection' : undeclared identifier
d:\ice-3.0.1-vc60\include\ice\proxy.h(400) : error C2027: use of undefined type 'Object'
d:\ice-3.0.1-vc60\include\ice\objectf.h(18) : see declaration of 'Object'
d:\ice-3.0.1-vc60\include\ice\proxy.h(400) : error C2039: 'ice_newFacet' : is not a member of 'ProxyHandle<class Ice::Object>'
d:\ice-3.0.1-vc60\include\ice\localexception.h(543) : error C2079: 'badMagic' uses undefined class 'vector<unsigned char,class _STL::allocator<unsigned char> >'
Generating Code...
Error executing cl.exe.

mydll.dll - 5 error(s), 2 warning(s)


My include file sequence is:
D:\ICE-3.0.1-VC60\INCLUDE\STLPORT
D:\ICE-3.0.1-VC60\INCLUDE
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE
D:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE
D:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE

How I can fix this?

Comments

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Take a look at how the MFC demos that accompany the Ice distribution work. They are contained in the demo/Ice/MFC/ directory.
Sign In or Register to comment.