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. How can I make changes to the effective qmake call?
Forum Updated to NodeBB v4.3 + New Features

How can I make changes to the effective qmake call?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
16 Posts 3 Posters 5.9k Views 2 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.
  • J Offline
    J Offline
    jdent
    wrote on last edited by
    #3

    Ok, I added CONFIG += c++14 to my *.pro file, but now I am getting compiler errors like "/Users/juandent/Qt5.5.1/5.5/clang_64/lib/QtCore.framework/Headers/qstring.h:739: error: no type named 'u16string' in namespace 'std'
    static inline QString fromStdU16String(const std::u16string &s);"
    ~~~~~^
    in code like:

    #if defined(Q_COMPILER_UNICODE_STRINGS) || defined(Q_QDOC)
    static inline QString fromStdU16String(const std::u16string &s);
    inline std::u16string toStdU16String() const;
    static inline QString fromStdU32String(const std::u32string &s);
    inline std::u32string toStdU32String() const;
    #endif

    ?? This does not occur if I use CONFIG += c++11

    Thanks,
    Juan

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jdent
      wrote on last edited by
      #4

      What is strange about this error is that even if I #include<string>, the compiler complains that u16string does not exist in std namespace...

      which is false!!
      Is something corrupt??

      Any ideas?
      Juan

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #5

        Hi,

        Are you running OS X ? What version of Qt ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jdent
          wrote on last edited by
          #6

          Hi,

          Qt Creator version 3.5.1 (open source) based on Qt 5.5.1 (Clang 6.0 (Apple), 64 bit).

          OS X version 10.11.2

          Thanks,
          Juan

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #7

            Also Qt 5.5.1 ? Or 5.6.0 Beta ?

            Can you show your .pro file ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • J Offline
              J Offline
              jdent
              wrote on last edited by
              #8

              Hi,

              Yes Qt 5.5.1

              The .pro is:

              TEMPLATE = app
              INCLUDEPATH += .

              HEADERS = bookdelegate.h bookwindow.h initdb.h
              RESOURCES = books.qrc
              SOURCES = bookdelegate.cpp main.cpp bookwindow.cpp
              FORMS = bookwindow.ui

              CONFIG += c11
              CONFIG += c++14

              QT += sql widgets widgets

              target.path = $$[QT_INSTALL_EXAMPLES]/sql/books
              INSTALLS += target

              wince {
              CONFIG(debug, debug|release):sqlPlugins.files = $$QT_BUILD_TREE/plugins/sqldrivers/d4.dll
              CONFIG(release, debug|release):sqlPlugins.files = $$QT_BUILD_TREE/plugins/sqldrivers/
              [^d]4.dll
              sqlPlugins.path = sqldrivers
              DEPLOYMENT += sqlPlugins
              }

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #9

                It should be CONFIG += c++11

                Also check that you are using the clang mkspec

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  jdent
                  wrote on last edited by
                  #10

                  Hi,

                  Yes with c++11 it works but I want to use c++14, and I know Xcode 7.2 supports c++14 ... since under the covers the compiler is doing the compiling, why can't I instruct it to work in C++ 14 mode?

                  What do you mean by clang mkspec? Where do I find that?

                  Thank you very much for your help so far!!
                  Juan

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #11

                    Go to Qt Creator's preferences and take a look at the Kit, you should see there the mkspec. If empty look at the Qt Version used for the Kit but AFAIK, it should be clang by default.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      jdent
                      wrote on last edited by
                      #12

                      what about using C++14? -- is it not possible?

                      Juan

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by SGaist
                        #13

                        It should be yes. Usually only "CONFIG += c++14" should be enough.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          jdent
                          wrote on last edited by
                          #14

                          Qt mkspec is empty but Qtversion is Qt 5.5.1 clang 64bit

                          ?? Still have the problem

                          Thanks

                          1 Reply Last reply
                          0
                          • J Offline
                            J Offline
                            jdent
                            wrote on last edited by
                            #15

                            Hi Qt Champ!

                            I found the answer finally!!

                            The solution is: IN ORDER to use C++14 you must also enable C++11, like so:

                            CONFIG+= c++11
                            CONFIG+= c++14

                            That solves all the problems!!

                            Thanks for the help!

                            Juan

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #16

                              Great !

                              Then please mark the thread as solved using the "Topic Tool" button so other forum users may know a solution has been found :)

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              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