Archived
This forum has been archived. Please start a new discussion on GitHub.
Dynamic_cast unpredict result
I Define Slice. It Contain
class A
{
void Open();
}
class B extend class A
{
}
Slice2cpp it genenerate test.h test.cpp
on Server
I define
class BImpl :public class B
{
virtual void Open(...);
}
void BImpl::Open(...)
{
cout<< "ok"<<endl;
}
On Client
BPrx->Open();
I check config files. They are correct.
But ocurr some questions:
Client.exe ocurr wrong. I debug......
I found dynamic cast used on Ploymorphic type "ICE......." with /GR-.
I don't understand it. Please give me a reply.
Dynamic
class A
{
void Open();
}
class B extend class A
{
}
Slice2cpp it genenerate test.h test.cpp
on Server
I define
class BImpl :public class B
{
virtual void Open(...);
}
void BImpl::Open(...)
{
cout<< "ok"<<endl;
}
On Client
BPrx->Open();
I check config files. They are correct.
But ocurr some questions:
Client.exe ocurr wrong. I debug......
I found dynamic cast used on Ploymorphic type "ICE......." with /GR-.
I don't understand it. Please give me a reply.
Dynamic
0
Comments
-
I'm sorry, but I do not understand the question. With what exactly do you need help?0
-
Originally posted by marc
I'm sorry, but I do not understand the question. With what exactly do you need help?
Complie the program with Visual C++.
these are many "Warning" like
Warning C4541: dynamic_cast used on the Ploymorphic type .........with /GR-.
I mean,how to get rid of them
"Warning".
At the beginning ,I think, dyanmic_cast don't support Ploymorphic(ice slice don't support Ploymorphic type).0 -
With Visual C++ 6 (which I assume you are using), you must enable RTTI:
Project->Setting->C/C++->C++ Language->Enable Runtime Type Information (RTTI)0 -
Originally posted by marc
With Visual C++ 6 (which I assume you are using), you must enable RTTI:
Project->Setting->C/C++->C++ Language->Enable Runtime Type Information (RTTI)
Thanks.
My Success! ICE is a smart tool !I love it.0