Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Compiling in debug mode fails
Forum Updated to NodeBB v4.3 + New Features

Compiling in debug mode fails

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
5 Posts 3 Posters 784 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Jonathan LevanonJ Offline
    Jonathan LevanonJ Offline
    Jonathan Levanon
    wrote on last edited by
    #1

    Hi,
    I'm trying to compile my project in debug mode in the Qt creator (Qt Creator 4.6.0-rc1 (4.5.83)). I'm using qmake, and this is my pro file

    TEMPLATE = app
    TARGET = ...
    CONFIG += c++17
    
    CONFIG -= gnu++17
    LIBS += -lXi -ldl -lm
    LIBS += -lX11
    LIBS += -lGL
    LIBS += -lmediainfo
    LIBS += -lglut #-lusb-1.0
    LIBS += -lGLU
    LIBS += -lpython2.7
    CONFIG -= no-pkg-config
    CONFIG += link_pkgconfig
    PKGCONFIG += opencv
    QMAKE_CXX =  g++ -std=c++1z
    QMAKE_CFLAGS = -march=native -mtune=native
    QMAKE_CXXFLAGS = -march=native -mtune=native
    QMAKE_CXXFLAGS_RELEASE -= -O
    QMAKE_CXXFLAGS_RELEASE -= -O1
    QMAKE_CXXFLAGS_RELEASE -= -O2
    QMAKE_CXXFLAGS_RELEASE *= -O3
    QMAKE_CXXFLAGS -= -std=gnu++11
    
    QT = core gui concurrent
    QT += widgets
    QT += network
    QT += opengl testlib
    QT += multimedia
    QT += multimediawidgets
    QT += charts sql
    
    
    SOURCES += \
    ....
    
    
    
    HEADERS += \
    ....
    
    includes...
    
    DISTFILES += \
        untitled.supp \
        ../../uncrustify.cfg
    
    RESOURCES += \
        ieresources.qrc
    
    libs....
    

    However, in debug mode I always get the -std=gnu++11 flag added automatically, and then c++14/17 feature don't compile. I'm using ubuntu 18.04 and gcc 7.3 (It also fails when trying to compile with clang 6).

    Any suggestions?

    K aha_1980A 2 Replies Last reply
    0
    • Jonathan LevanonJ Jonathan Levanon

      Hi,
      I'm trying to compile my project in debug mode in the Qt creator (Qt Creator 4.6.0-rc1 (4.5.83)). I'm using qmake, and this is my pro file

      TEMPLATE = app
      TARGET = ...
      CONFIG += c++17
      
      CONFIG -= gnu++17
      LIBS += -lXi -ldl -lm
      LIBS += -lX11
      LIBS += -lGL
      LIBS += -lmediainfo
      LIBS += -lglut #-lusb-1.0
      LIBS += -lGLU
      LIBS += -lpython2.7
      CONFIG -= no-pkg-config
      CONFIG += link_pkgconfig
      PKGCONFIG += opencv
      QMAKE_CXX =  g++ -std=c++1z
      QMAKE_CFLAGS = -march=native -mtune=native
      QMAKE_CXXFLAGS = -march=native -mtune=native
      QMAKE_CXXFLAGS_RELEASE -= -O
      QMAKE_CXXFLAGS_RELEASE -= -O1
      QMAKE_CXXFLAGS_RELEASE -= -O2
      QMAKE_CXXFLAGS_RELEASE *= -O3
      QMAKE_CXXFLAGS -= -std=gnu++11
      
      QT = core gui concurrent
      QT += widgets
      QT += network
      QT += opengl testlib
      QT += multimedia
      QT += multimediawidgets
      QT += charts sql
      
      
      SOURCES += \
      ....
      
      
      
      HEADERS += \
      ....
      
      includes...
      
      DISTFILES += \
          untitled.supp \
          ../../uncrustify.cfg
      
      RESOURCES += \
          ieresources.qrc
      
      libs....
      

      However, in debug mode I always get the -std=gnu++11 flag added automatically, and then c++14/17 feature don't compile. I'm using ubuntu 18.04 and gcc 7.3 (It also fails when trying to compile with clang 6).

      Any suggestions?

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @Jonathan-Levanon

      Why are you using a release candidate (4.6.0-rc1)of creator ?

      Creator version 4.7.1 is already out. Release candidates still may have a problem.

      Also CONFIG -= gnu++17 does not remove gnu++11 if that was your intension.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      2
      • Jonathan LevanonJ Jonathan Levanon

        Hi,
        I'm trying to compile my project in debug mode in the Qt creator (Qt Creator 4.6.0-rc1 (4.5.83)). I'm using qmake, and this is my pro file

        TEMPLATE = app
        TARGET = ...
        CONFIG += c++17
        
        CONFIG -= gnu++17
        LIBS += -lXi -ldl -lm
        LIBS += -lX11
        LIBS += -lGL
        LIBS += -lmediainfo
        LIBS += -lglut #-lusb-1.0
        LIBS += -lGLU
        LIBS += -lpython2.7
        CONFIG -= no-pkg-config
        CONFIG += link_pkgconfig
        PKGCONFIG += opencv
        QMAKE_CXX =  g++ -std=c++1z
        QMAKE_CFLAGS = -march=native -mtune=native
        QMAKE_CXXFLAGS = -march=native -mtune=native
        QMAKE_CXXFLAGS_RELEASE -= -O
        QMAKE_CXXFLAGS_RELEASE -= -O1
        QMAKE_CXXFLAGS_RELEASE -= -O2
        QMAKE_CXXFLAGS_RELEASE *= -O3
        QMAKE_CXXFLAGS -= -std=gnu++11
        
        QT = core gui concurrent
        QT += widgets
        QT += network
        QT += opengl testlib
        QT += multimedia
        QT += multimediawidgets
        QT += charts sql
        
        
        SOURCES += \
        ....
        
        
        
        HEADERS += \
        ....
        
        includes...
        
        DISTFILES += \
            untitled.supp \
            ../../uncrustify.cfg
        
        RESOURCES += \
            ieresources.qrc
        
        libs....
        

        However, in debug mode I always get the -std=gnu++11 flag added automatically, and then c++14/17 feature don't compile. I'm using ubuntu 18.04 and gcc 7.3 (It also fails when trying to compile with clang 6).

        Any suggestions?

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi @Jonathan-Levanon,

        Try replacing CONFIG += c++17 with CONFIG += c++1z in the pro file.

        Qt has to stay free or it will die.

        1 Reply Last reply
        5
        • Jonathan LevanonJ Offline
          Jonathan LevanonJ Offline
          Jonathan Levanon
          wrote on last edited by
          #4

          thanks @aha_1980 , it worked

          aha_1980A 1 Reply Last reply
          0
          • Jonathan LevanonJ Jonathan Levanon

            thanks @aha_1980 , it worked

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Jonathan-Levanon So please mark this topic as SOLVED. Thanks!

            Qt has to stay free or it will die.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved