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. QCoreApplication::instance() is NULL
Forum Updated to NodeBB v4.3 + New Features

QCoreApplication::instance() is NULL

Scheduled Pinned Locked Moved General and Desktop
qt4migrationqt5
24 Posts 5 Posters 15.8k Views 4 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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 13 Jan 2016, 14:23 last edited by
    #21

    Since I don't know if you are using a shadow build, are you using the same names for your static debug release libraries ? Are you putting them in the same folder ?

    If so you might be linking to a release version of your lib accidentally which in turn would pull the release Qt libraries.

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

    P 1 Reply Last reply 13 Jan 2016, 15:18
    0
    • P Offline
      P Offline
      pullmoll
      wrote on 13 Jan 2016, 15:16 last edited by pullmoll
      #22

      After posting to Qt development ML and getting a reply, an even simpler solution is to just

      CONFIG -= debug_and_release
      

      in the *.pro files of the staticlib submodules. I don't know why, but debug_and_release seems to be a default. My project, developed with QtCreator since Qt4, doesn't define this flag.

      1 Reply Last reply
      1
      • S SGaist
        13 Jan 2016, 14:23

        Since I don't know if you are using a shadow build, are you using the same names for your static debug release libraries ? Are you putting them in the same folder ?

        If so you might be linking to a release version of your lib accidentally which in turn would pull the release Qt libraries.

        P Offline
        P Offline
        pullmoll
        wrote on 13 Jan 2016, 15:18 last edited by
        #23

        @SGaist said:

        If so you might be linking to a release version of your lib accidentally which in turn would pull the release Qt libraries.

        I'm using QtCreator and have separate shadow build directories for debug and release. The culprit was the debug_and_release flag in CONFIG which I have to remove in the *.pro files...

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 13 Jan 2016, 22:02 last edited by
          #24

          Still a bit strange but glad you found a solution :)

          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

          21/24

          13 Jan 2016, 14:23

          • Login

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