Results 1 to 3 of 3

Thread: MFC DLL with ICE

  1. #1
    amrufon's Avatar
    amrufon is offline Registered User
    Name: Alex
    Organization: IST
    Project: jDatabase
    Join Date
    May 2003
    Location
    Manila, Philippines
    Posts
    96

    MFC DLL with ICE

    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

  2. #2
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    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?

  3. #3
    amrufon's Avatar
    amrufon is offline Registered User
    Name: Alex
    Organization: IST
    Project: jDatabase
    Join Date
    May 2003
    Location
    Manila, Philippines
    Posts
    96
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 05-02-2007, 09:51 AM
  2. Create MFC DLL error
    By jyq in forum Help Center
    Replies: 1
    Last Post: 02-23-2006, 12:13 AM
  3. Link error when adding MFC header in dll project
    By emoly in forum Help Center
    Replies: 7
    Last Post: 09-12-2005, 07:49 AM
  4. How can use MFC with ICE???
    By alesio in forum Help Center
    Replies: 6
    Last Post: 12-05-2003, 03:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •