Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 12-30-2003
alesio alesio is offline
Registered User
 
 
Join Date: Nov 2003
Location: sz
Posts: 9
"MFC" Help???

hello:
I have a problem with compile the mfc application.

For example:

#include <ice/ice.h>
class CEnterpriseConfigDlg : public CDialog
{
//......
//......
}

when i include the <ice/ice.h> file ,the follow errors are appeare .why?
i try a many times but also can not solve it. Thanks!!!!!!!!

--------------------Configuration: EnterpriseCenterMMC - Win32 Debug--------------------

Compiling...
EnterpriseConfigDlg.cpp
..\code\ice-1.2.0\include\ice\config.h(83) : error C2065: 'WSAGetLastError' : undeclared identifier
..\code\ice-1.2.0\include\iceutil\mutex.h(146) : error C2065: 'TryEnterCriticalSection' : undeclared identifier
..\code\ice-1.2.0\include\iceutil\time.h(38) : error C2833: 'operator timeval' is not a recognized operator or type
..\code\ice-1.2.0\include\iceutil\time.h(38) : error C2059: syntax error : 'newline'
..\code\ice-1.2.0\include\iceutil\time.h(38) : error C2238: unexpected token(s) preceding ';'
Generating Code...
Error executing cl.exe.
Creating browse info file...
EnterpriseCenterMMC.exe - 5 error(s), 0 warning(s)
Reply With Quote
  #2 (permalink)  
Old 12-30-2003
mes's Avatar
mes mes is online now
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 962
Hi,

The current release of Ice prefers that its header files be included before any other Windows headers. Unfortunately, that conflicts with many MFC applications, which require stdafx.h to be included first if you are using precompiled headers.

The next release of Ice will be more flexible in this respect. Meanwhile, you should be able to fix this problem by modifying your stdafx.h file in two ways. First, add the following code at the beginning of the file (before any #include directives):
Code:
#ifndef _WIN32_WINNT
#   define _WIN32_WINNT 0x400
#endif
Second, add the following line at the end of stdafx.h:
Code:
#include <afxsock.h>
If you're still having trouble, please attach a ZIP file of a small VC project that demonstrates the problem and we'll be happy to take a look at it.

Take care,
- Mark
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Don't "Ice-3.1.1-VC71.msi " include the "slice2java.exe"? Jason Gao Help Center 4 10-26-2006 11:23 AM
Icepack registry "TimeOut" exception with heavy load eaglecn Help Center 1 05-26-2006 12:02 AM
"Invalid UTF8 string" when transer chinese chars between cpp server and csharp client raygo Help Center 8 03-21-2006 08:34 PM
starting "ice" process (node/admin etc) via Java BobDeAnna Help Center 6 01-04-2005 09:26 AM
Going from "in" to "out" param, using a class as a union catalin Help Center 1 04-05-2004 08:55 AM


All times are GMT -4. The time now is 06:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.