Results 1 to 14 of 14

Thread: Why can't I make dynamic_cast work properly?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2006
    Location
    Stockholm, Sweden
    Posts
    81
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: Why can't I make dynamic_cast work properly?

    Ok I found the problem... but not solved it.

    The dynamic_cast doesn't work because I use FORTRAN libs when linking the library. There is one lib called -lcxa that mess dynamic_cast up. Anyone have any tips? The fortran compiler is a Intel 9.0.

    I love FORTRAN, From Out Rectum Taken Rigmarole And Nogood

    pir

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Why can't I make dynamic_cast work properly?

    Why don't you use gcc to compile your fortran gizmos? AFAIK gcc supports fortran. Maybe it'll work better.

  3. #3
    Join Date
    May 2006
    Location
    Stockholm, Sweden
    Posts
    81
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: Why can't I make dynamic_cast work properly?

    The FORTRAN code is written for the intel ifort compiler. I don't know much about FORTRAN, but there seems like the syntax for ifort FORTRAN is some kind of mix of FORTRAN90 and FORTRAN75 ( or what they are called )... anyway I don't think that it will compile on any other compiler than on ifort.

    But fortunatelly typeid() works just fine, so I can use that in combination with static_cast... Will work for the moment. But I suppose I need to fix this.


    thanks
    pir

  4. #4
    Join Date
    May 2006
    Location
    Stockholm, Sweden
    Posts
    81
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: Why can't I make dynamic_cast work properly?

    If there is someone who cares about this problem... here is the solution.

    check out the link:
    http://yolinux.com/TUTORIALS/LinuxTu...rtranAndC.html

    This is the part that could save a poor (SA)FORTRAN cursed soul some tears:

    Use GNU g++ or Intel C++ compiler to compile and link with main():
    g++ -o name-of-exe main_prog.cpp file1.o file2.o -L/opt/intel/fc/9.0/lib -lifport -lifcore -limf -Wabi -Wcast-align

    If this can help only one person who has this problem, I'm more than happy.
    Last edited by pir; 18th July 2006 at 16:26.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.