Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved UI of my application is weird with Qt 4/5 on OS X 10.11 El Capitan

    General and Desktop
    xcode qt5 qt4 el capitan osx 10.11
    3
    12
    3976
    Loading More Posts
    • 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.
    • SGaist
      SGaist Lifetime Qt Champion last edited by

      Hi and welcome to devnet,

      You can disable C++11 so it will link to libstdc++.

      CONFIG -= c++11
      

      Other than that Qt 4's last official release supports OS X 10.10, it should work on 10.11 but there's no guarantee as the level of support since Apple is making subtle changes each time.

      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 Reply Quote 0
      • D
        DEADBEEF @mcosta last edited by

        Thank you for your welcoming messages.

        @mcosta unfortunately I won't be able to show example of code because the application is about 500 000 lines and as I'm new in the company (and Qt) I don't know where the problem comes from. So if you have an idea of what part of Qt could be responsible of this, I could investigate and show you an example of this part. But basically it's "I've a code which works perfectly on all the mac os x version, when the app is launched on el capitan everything is collapsing".

        Concerning the image, as I work for a company I would prefer to not share it. But it's simple to see. Imagine you have a windows with some buttons centred. Once it's launched on el capitan some buttons will disappear and other will be moved.

        @SGaist How can I do this in Xcode? In my project Build Settings I can set the "C++ standard library" to libc++ or libstdc++. Is it what you're talking about?
        The problem is if I use libstdc++ I get the problem I linked problem-with-qt-5-5 where the solution is to use libc++ but if I do that I couldn't use <tr1/tulpe> anymore...

        1 Reply Last reply Reply Quote 0
        • D
          DEADBEEF last edited by

          I almost manage to compile after changing some include with <QtWidgets> and my moc script from
          "moc ${INPUT_FILE_PATH} -f -o ${INPUT_FILE_DIR}/moc_${INPUT_FILE_BASE}.cxx"
          to "moc ${INPUT_FILE_PATH} -f ${INPUT_FILE_PATH} -o ${INPUT_FILE_DIR}/moc_${INPUT_FILE_BASE}.cxx"
          I don't understand why I needed to add a path after -f because it's said in the doc that the path is optional...

          But now WOW I've 600 errors! I don't know if hell exists but I think it could look like my project! ahah. The "good" new is that it's always the same error, here is a template
          "Undefined symbols for architecture x86_64:
          "ClassName::MethodName( various stuff like std::__1::vector<std::__1::queue<float, blabla)", referenced from: -[ClassName MethodName] in FileName.o"

          Does anybody know what it means?

          1 Reply Last reply Reply Quote 0
          • M
            mcosta last edited by

            Sorry,

            but we don't have a crystal ball; if we can't see your code (and also seems you use a custom Makefile) we can't help you so much.

            Once your problem is solved don't forget to:

            • Mark the thread as SOLVED using the Topic Tool menu
            • Vote up the answer(s) that helped you to solve the issue

            You can embed images using (http://imgur.com/) or (http://postimage.org/)

            D 1 Reply Last reply Reply Quote 0
            • D
              DEADBEEF @mcosta last edited by

              @mcosta I totally understand your thoughts and I'm sorry if I expressed myself poorly but the thing is I' totally new on this project and I know nothing about Qt. That are the reason why I may seem lost.
              Furthermore I agree with you that without any code you couldn't help me (or others people who could have the same problems) and I'm glad that you took time to give me some answers. But the thing is that I've 500 000 lines so I just don't know what to show you.

              The only error I got now is "Undefined symbols for architecture x86_64:
              "ClassName::MethodName( parameters)", referenced from: -[ClassName MethodName] in FileName.o" "

              Maybe if you already saw this kind of error in Qt I could see in the code and show you the concerned part

              By the way, as I discover Qt at the same time, I saw in the project a file named FindQt.cmake and inside it only talksabout Qt3 and Qt4. I guess i need to write a cmake for Qt5, no?

              1 Reply Last reply Reply Quote 0
              • M
                mcosta last edited by

                Hi,

                about CMake with Qt5 you can read this page.

                about the linking error, seems some missing linked libraries

                Once your problem is solved don't forget to:

                • Mark the thread as SOLVED using the Topic Tool menu
                • Vote up the answer(s) that helped you to solve the issue

                You can embed images using (http://imgur.com/) or (http://postimage.org/)

                D 1 Reply Last reply Reply Quote 0
                • D
                  DEADBEEF @mcosta last edited by

                  @mcosta Thank you for the links.
                  I took some time to reply because I wanted to be sure about something.

                  I find the real reason about my problem:the build of my libraries. Indeed, some of our in-house libraries are build with libstdc++ and other with libc++. I cannot change this thing for the moment unfortunately. As the version of qt5 that I use prompts me to build in libc++, I get a lot of link error.

                  So my question is: is it possible to use a version of qt5 builded with libstdc++ ? If not, how could pass through the error no type named 'u16string' in namespace 'std' in qstring.h, using libstdc++ ?

                  1 Reply Last reply Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    Are you by any chance using the old macx-g++ mkspec ? If so, you should change to macx-clang, that should solve your problem.

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

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      DEADBEEF @SGaist last edited by

                      @SGaist I apologize for my "noob" question but... Where can I check in Xcode if we use the old mac-g++ ? I'm really new with qt.
                      What I did was: download and link qt5 with home-brew and add the frameworks I needed in the "linked frameworks and libraries" part of "General" tab in my Xcode project.

                      1 Reply Last reply Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        Did you generate the Xcode project using qmake ?

                        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 Reply Quote 0
                        • First post
                          Last post