Problem with RTTI
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Problem with RTTI

  1. #1
    Join Date
    Apr 2005
    Posts
    1,734

    Problem with RTTI

    What is wrong with this code

    Code:
    Obj<TCHAR>* obj = dynamic_cast<Obj<TCHAR>* >(I->objects[0]);
    Which is resulting in this error

    Code:
    A dynamic cast is present, but the correct RTTI option is not specified.

  2. #2
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,286

    Re: Problem with RTTI

    Maybe you have to specify some copiler option to let it generate extra code to enable the dynamic_cast keyword to work?
    At least, it is what IBM compiler requires: http://publib.boulder.ibm.com/infoce...2Fruoptrtt.htm
    Victor Nijegorodov

  3. #3
    Join Date
    Apr 2005
    Posts
    1,734

    Re: Problem with RTTI

    Quote Originally Posted by VictorN View Post
    Maybe you have to specify some copiler option to let it generate extra code to enable the dynamic_cast keyword to work?
    At least, it is what IBM compiler requires: http://publib.boulder.ibm.com/infoce...2Fruoptrtt.htm
    What are those compiler options that I have to specify?

  4. #4
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,286

    Re: Problem with RTTI

    How could I know it?
    Ask your compiler documentation! Read its Help...
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center