Archived
This forum has been archived. Please start a new discussion on GitHub.
problem with c++ compilation
I would like to test the Hello program in the Ice Book in c++.
I wrote the differents programs (HelloI.cpp, Server.cpp,...)
I compile them using gcc 3.4.4 with cygwin.
I get a lot of errors. I check my programs. It seems i didn't do errors while coping them from the book.
Maybe the problems is because I use cygwin... I don't know.
I join my programs and a file which contain the errors.
Could you tell me what is wrong ?
Thanks a lot
I wrote the differents programs (HelloI.cpp, Server.cpp,...)
I compile them using gcc 3.4.4 with cygwin.
I get a lot of errors. I check my programs. It seems i didn't do errors while coping them from the book.
Maybe the problems is because I use cygwin... I don't know.
I join my programs and a file which contain the errors.
Could you tell me what is wrong ?
Thanks a lot
0
Comments
-
Ice isn't supported with gcc under cygwin -- of course, you could port it yourself, but you'll have better luck if you use one of the supported installations.0
-
Thnak you for your answer !0
-
Compiled with cl
I have compiled your files with cl.exe and all was ok only in server.cpp had an error in line 24 adapter:undeclared identifier, i think that you miss and "d" 2 lines up , after i try to run but it fails and shows a message :
f:\Ice-3.0.1-VC60\include\IceUtil/Handle.h:39: IceUtil::NullHandleException
But i don`t know anything about this yet, All will arrive
Un saludo, bye0 -
NullHandleException means that you are using a handle which has not yet been assigned. For example:
Ice::ObjectAdapterPtr adapter;
adapter->createProxy(...);
This would cause a NullHandleException. Its more or less equivalent to dereferencing a null pointer.0