Results 1 to 5 of 5

Thread: CGAL flag options with Qt

  1. #1
    Join Date
    May 2012
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default CGAL flag options with Qt

    Hi guys I need help to pass this CGAL command into a Qt project:

    Qt Code:
    1. g++ -frounding-math -O3 -lCGAL -lgmp main.cpp
    To copy to clipboard, switch view to plain text mode 

    So far the libraries are linked with this:

    Qt Code:
    1. LIBS += -L/lib64 -lgmp -lCGAL
    To copy to clipboard, switch view to plain text mode 

    But I can't pass the flags: -frounding-math -O3

    Any ideas? (=

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

    Default Re: CGAL flag options with Qt

    Set them in QMAKE_CXXFLAGS.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    May 2012
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: CGAL flag options with Qt

    I have tried:

    Qt Code:
    1. LIBS += -L/lib64 -lgmp -lCGAL
    2. QMAKE_CXXFLAGS += -frounding-math -O3
    To copy to clipboard, switch view to plain text mode 

    And I still getting this error

    Qt Code:
    1. Explanation: Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model strict for Intel)?
    To copy to clipboard, switch view to plain text mode 

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

    Default Re: CGAL flag options with Qt

    Are the flags you set in the compiler command being ran?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    May 2012
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: CGAL flag options with Qt

    Thats weird ! I run again my code with this lines:

    Qt Code:
    1. LIBS += -L/lib64 -lgmp -lCGAL
    2. QMAKE_CXXFLAGS += -frounding-math -O3
    To copy to clipboard, switch view to plain text mode 

    And now all is working fine, I can't explain it maybe a restart of qt was required but I'm not sure about that. Anyway thanks for your advice it was very useful

Similar Threads

  1. CGAL in Qt4?
    By lni in forum Qt Programming
    Replies: 3
    Last Post: 26th January 2017, 18:28
  2. How can we add -O2 flag into .pro file?
    By learning_qt in forum Qt Programming
    Replies: 3
    Last Post: 4th November 2009, 08:15
  3. Flag storing
    By bismitapadhy in forum Qt Programming
    Replies: 1
    Last Post: 24th June 2009, 05:26
  4. Qt & Cgal
    By gallipi in forum Installation and Deployment
    Replies: 2
    Last Post: 19th June 2007, 18:57
  5. using Q::desktop flag
    By nupul in forum Newbie
    Replies: 1
    Last Post: 30th April 2006, 14:58

Tags for this Thread

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.