Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt loads plugins of release version on a debug build - Mac only
QtWS25 Last Chance

Qt loads plugins of release version on a debug build - Mac only

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 4.1k Views
  • 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.
  • D Offline
    D Offline
    ducktail
    wrote on last edited by
    #1

    Hi there,

    We have an application built with Qt but doesn't have Qt bin(s) put in the application bin folder in our development build, instead we set the location of Qt bin(s) to the PATH of the application so for it to find Qt modules.

    The problem with this is that Qt is not able to find and load the plugins. We followed instructions in this "page":http://doc.qt.nokia.com/4.5/deployment-windows.html and called QApplication::addLibraryPath() to set the folder of /plugins in. It works well on Windows.

    However, on Mac, Qt gets to the plugins folder and load releases version of the plugins for the debug build, and causes a crash later on.

    Does this sound like a known issue?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      Maybe you should set DYLD_IMAGE_SUFFIX to -debug:

      do a
      @export DYLD_IMAGE_SUFFIX=_debug@
      for your bash or put it to the execution environment in Creator.

      If you're on snow leo you should also follow the advice on "this page":http://developer.qt.nokia.com/wiki/MacOSXTroubleshooting too.

      HTH,
      Volker

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • D Offline
        D Offline
        ducktail
        wrote on last edited by
        #3

        Hi Volker,

        Thanks for the reply.

        The situation is that, our application, in debug mode, links against debug versions of Qt framework. When the application starts, it loads the debug versions of Qt framework correctly.

        Problem happens when Qt tries to load the plugins: Qt loads the release version of the plugins while the running Qt framework is debug version.

        My confusion is that, is this something Qt is supposed to do, or is there anything I'm missing to have it load the debug version plugins correctly?

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          Hi ducktail,

          this is definitely not the right behaviour.

          You mentioned that you use QApplication::addLibraryPath() to add the library path. That could be the problem. That adds your plugin dir to the search path, but the default search path of Qt is still active and that could cause the system to load the release plugins.

          I'd suggest you try QApplication::setLibraryPaths() or QApplication::removeLibraryPath() to get rid of the system path.

          http://www.catb.org/~esr/faqs/smart-questions.html

          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