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. One of the two will be used. Which one is undefined.... error
Forum Updated to NodeBB v4.3 + New Features

One of the two will be used. Which one is undefined.... error

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

    i am on Mac OS X.6 using qt 4.8.2 within XCode.

    I built Qt as a static library. I linked this static library within 2 different plug-ins. I have an host application (non qt), that can load one or the other of those plug-ins...

    if i work with only one of the 2 plug-ins... load and quit plug-in 1 or plug-in 2 only all works fine.
    If i load plug-in 1 (or 2), then close the plug-in, then load the second one... i get in console many similar messages with various classes
    Class QCocoaColorPanelDelegate is implemented in both /Applications/xxxapp/Plug-ins/plugin1 and /Applications/xxxapp/Plug-ins/plugin2. One of the two will be used. Which one is undefined.

    then a crash...

    i have no clue why this is happening... i obviously load the qt binaries twice but any hint on how to to avoid this double loading would be awesome

    i did post a couple of weeks ago the same issue on another qt forum.. but have not got any answer, i am totally stuck now... and i do apologize for those who are covering different forums and have seen this question

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rcari
      wrote on last edited by
      #2

      Your problem is that each plugin contains Qt. The symbols for Qt are in both libraries which leads to the problem you describe. The only viable solution for you is to build a SHARED Qt, and link your plugins to this version that will be loaded dynamically along with your plugins, only ONCE, even if you load the two plugins.

      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