Archived

This forum has been archived. Please start a new discussion on GitHub.

Error report when I use Ice in win32 dll

I creat a new project of win32 DLL in visual .net 2003

And I add "#include <Ice/Ice.h>"
and then,I follow the config advice in
http://www.zeroc.com/vbulletin/showthread.php?s=&postid=1180#post1180

----development platform
vc 7.1
win2000 professional simplified chinese
ice 1.20
and then I complie my appilcation.The follow error report:


c:\Ice-1.2.0\include\Ice\Config.h(83) : error C2059:syntax error:')'
c:\Ice-1.2.0\include\IceUtil\Mutex.h(146) : error C3861: “TryEnterCriticalSection”: identifier not found, even with argument-dependent lookup The compiler was not able to resolve
c:\Ice-1.2.0\include\IceUtil\Time.h(38) : error C2833: “operator timeval”is not a recognized operator or type The word operator must be followed by an operator
c:\Ice-1.2.0\include\IceUtil\Time.h(38) : error C2059: syntax error: 'newline'
c:\Ice-1.2.0\include\IceUtil\Time.h(38) : error C2238: unexpected token(s) preceding ';'

why?
And how can I make my application of win32 DLL work with just "#include <Ice/Ice.h>"?

Comments

  • bernard
    bernard Jupiter, FL
    Hello,

    This looks like an include-ordering issue, similar to the one encountered by Alesio:
    http://www.zeroc.com/vbulletin/showthread.php?s=&threadid=301

    It is necessary to define _WIN32_WINNT 0x0400 before the first inclusion of <windows.h>, but this may not be sufficient to resolve all your compilation problem.

    We'll provide soon a demo that shows how to use Ice and MFC.

    Cheers,
    Bernard