Archived
This forum has been archived. Please start a new discussion on GitHub.
Hello World in Visual Studio 6
Hi
I'm trying to build a simple Hello World app in Visual Studio 6. The demos provided, work fine. I wrote a simple Client.cpp and a Server.cpp as given in the Ice manual.
However, when I run Server.exe, it hangs at this point.. (I put cout's to see where it was hanging...)
adapter->add(object,Ice::stringToIdentity("SimplePrinter"));
When I try and run Client.exe, it hangs at this point..
PrinterPrx printer = PrinterPrx::checkedCast(base);
This works perfectly in Linux, its only with Visual Studio 6 that i'm having these problems.
Any clues?
abhay
I'm trying to build a simple Hello World app in Visual Studio 6. The demos provided, work fine. I wrote a simple Client.cpp and a Server.cpp as given in the Ice manual.
However, when I run Server.exe, it hangs at this point.. (I put cout's to see where it was hanging...)
adapter->add(object,Ice::stringToIdentity("SimplePrinter"));
When I try and run Client.exe, it hangs at this point..
PrinterPrx printer = PrinterPrx::checkedCast(base);
This works perfectly in Linux, its only with Visual Studio 6 that i'm having these problems.
Any clues?
abhay
0
Comments
-
the compile output for Server.exe
why do I get such warnings?
Compiling...
Printer.cpp
z:\projects\ice\visualstudio6\printer.cpp(95) : warning C4541: 'dynamic_cast' used on polymorphic type 'class IceDelegate::Ice::Object' with /GR-; unpredictable behavior may result
z:\projects\ice\visualstudio6\printer.cpp(191) : warning C4541: 'dynamic_cast' used on polymorphic type 'class Ice::Object' with /GR-; unpredictable behavior may result
c:\ice-3.0.0-vc60\include\ice\handle.h(171) : warning C4541: 'dynamic_cast' used on polymorphic type 'class Ice::Object' with /GR-; unpredictable behavior may result
z:\projects\ice\visualstudio6\printer.cpp(356) : see reference to function template instantiation 'class IceInternal::Handle<class Demo::Printer> __cdecl IceInternal::Handle<class Demo::Printer>::dynamicCast(const class IceUtil::HandleBase<c
lass Ice::Object> &)' being compiled
Server.cpp
Linking...
Server.exe - 0 error(s), 3 warning(s)0 -
Hi Abhay,
You need to enable RTTI for your project.
Best regards,
Bernard0 -
Enabled RTTI, but..
no luck. It still hangs in the same place.
0 -
Did you recompile all your code with RTTI enabled?0
-
Thanks!
Like an idiot, I was mixing debug with non-debug libraries.
It works cleanly now.
thanks a ton!0