Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Different behavior of Clang vs. gcc in OS-X
Forum Updated to NodeBB v4.3 + New Features

Different behavior of Clang vs. gcc in OS-X

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 989 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.
  • F Offline
    F Offline
    Frime
    wrote on last edited by Frime
    #1

    Hi together!

    Actually im trying to get my project working in OS-X again. The project is completely plugin-based. There is a big project tree with a lot of sub-projects compiled as binary plugins.
    If I compile it with clang, the plugins doesn't get loaded. It seems that clang ignores the include locations - given in *.pro file - of external librarys. With gcc all works fine - except the plugins which are using C++11.

    But on the other hand, I need C++11 support. The pre-installed gcc can't compile C++11. So what do you recommend?
    Every hint is welcome...

    Thanks in advance!
    Frime

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

      Hi,

      Did you add CONFIG += c++11 to your pro file(s) ?

      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
      • F Offline
        F Offline
        Frime
        wrote on last edited by
        #3

        Thanks for your response!
        Clang compiles it without any errors, but gcc doesn't ...
        The problems building my project with clang are really weird. There appear really strange runtime errors, which doesn't make any sense. My plugins can't be upcasted anymore (via qobject_cast), some singleton implementations return 0 pointers via instance() (after they have been already initialized).

        The same code works without any problems on windows and linux...
        Can some different compilers really influence the runtime-behavior so hard?

        Thanks in advance,
        frime

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

          What errors are you getting ?

          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