Home Help Center

MFC DLL with ICE

amrufonamrufon Member AlexOrganization: ISTProject: jDatabase ✭✭
Hello.

Because of my lack of knowledge in C++ and the multi-programming language nature of my project, I'm having trouble debugging my client side DLL (which uses ICE). So I thought of making an MFC DLL with Automation so I can actually debug my application.

So, I used the .Net MFC dll wizard and included the slice definition and ICE headers. When I compile it, im getting the following error:
C:\Ice-1.1.0\include\Ice\Config.h(84) : error C2065: 'WSAGetLastError' : undeclared identifier
C:\Ice-1.1.0\include\IceUtil\Time.h(38) : error C2833: 'operator timeval' is not a recognized operator or type
C:\Ice-1.1.0\include\IceUtil\Time.h(38) : error C2059: syntax error : 'newline'
C:\Ice-1.1.0\include\IceUtil\Time.h(38) : error C2238: unexpected token(s) preceding ';'

Any idea how I can fix this?

Thanks.

Alex

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    WSAGetLastError() is a standard winsock call. By including windows.h (which is included by IceUtil/Config.h), you should get the declaration of this function.

    I'm afraid I don't know enough about the MFC DLL automation. Perhaps it's doing some strange things, such as preventing the winsock headers from being included in windows.h?
  • amrufonamrufon Member AlexOrganization: ISTProject: jDatabase ✭✭
    Hello Marc,

    Thanks for this info. I remember that there is an option to include WINSOCK headers when making an MFC DLL using the wizard.

    Btw. Your correct, incorrect placement of the #include <Ice/Ice.h> in an MFC application will make the .NET compiler complaining about multiple inclusion of the <windows.h> file.

    I'll try including the winsock headers as soon as I get a few bugs squashed today.

    Thanks.

    Alex
Sign In or Register to comment.