Results 1 to 2 of 2

Thread: Necessitas: dynamic_cast_will_always_fail / How to set QMAKE_CXXFLAGS

  1. #1
    Join Date
    Jan 2012
    Location
    Dortmund, Germany
    Posts
    159
    Thanks
    69
    Thanked 10 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Necessitas: dynamic_cast_will_always_fail / How to set QMAKE_CXXFLAGS

    Hi, I have set up Necessitas Qt Creator (2.3.1) for Android and I am able to create some little programs.
    With my project I get this error message:

    C:\qtOnAndroid\Kombiversuch-build--Necessitas_Qt_4_8_0_for_Android_armv5_Release\..\. .\necessitas\Android\Qt\480\armeabi\include\QtCore \qglobal.h:2481: error: 'dynamic_cast_will_always_fail_because_rtti_is_dis abled' is not a member of 'QPushButton*'
    I've googled heavily: BogDan himself states, that exceptions and rtti are disabled by default - but they can be switched on with
    Qt Code:
    1. QMAKE_CXXFLAGS += -fexceptions -frtti
    To copy to clipboard, switch view to plain text mode 
    He points to a website for further reading, but I can't see how and where to set the CXXFLAGS, they are not mentioned on that page.

    I've tried adding this line at the beginning of my .pro-file (nothing changes, same error message).

    Then I've tried giving it as a parameter to qmake in Projects|BuildSteps|qmake|Details in the "additional arguments" line.
    This threw the error message:
    ***Unknown option -fexceptions
    The process "c:\necessitas\android\qt\480\armeabi\bin\qmake.ex e" exited with code 1.
    I am aware that I am obviously lacking very basic knowledge about the build process in QtCreator. So please excuse my questions:
    1. How can I set these two flags
    2. Where can I read more to understand the build process better?

    I'd gratefully appreciate any help on this!
    Last edited by sedi; 13th May 2012 at 20:04.

  2. #2
    Join Date
    Jan 2012
    Location
    Dortmund, Germany
    Posts
    159
    Thanks
    69
    Thanked 10 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Necessitas: dynamic_cast_will_always_fail / How to set QMAKE_CXXFLAGS

    Ok, I've finally found it out by myself, trial and error
    I just had to add
    CONFIG += rtti
    CONFIG += exceptions
    to my profile to get rid of this specific problem and be able to proceed to the next...

Similar Threads

  1. Necessitas Android Help
    By RENOLD in forum Qt Programming
    Replies: 0
    Last Post: 6th March 2012, 05:51
  2. Qt Necessitas - setFullScreen ?
    By leviribeiro in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 2nd November 2011, 23:56
  3. Necessitas: How to deploy shared library
    By Al_ in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 28th August 2011, 16:20
  4. Necessitas Qt for Android issue
    By rickrvo in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 8th June 2011, 11:30
  5. Qt for Android. Necessitas
    By freely in forum Newbie
    Replies: 3
    Last Post: 27th May 2011, 19:12

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.