Results 1 to 10 of 10

Thread: libqwt_designer_plugin.dylib - Not a valid plugin

  1. #1
    Join Date
    Jan 2011
    Posts
    12
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default libqwt_designer_plugin.dylib - Not a valid plugin

    Hey folks,

    After reading numerous posts, blogs and all sorts, I have finally decided I can't get QWT to work.

    I'm running:

    Qt Creator 2.0.1
    Based on Qt 4.7.0 (64 bit)
    Qwt 6.0.1

    I've tried just about every suggestion known to man, yet the plugin refuses to work. Doing a search, the only dylib related to qwt seems to be 'libqwt_designer_plugin.dylib', is this right? Does QT log reasons as to why a plugin fails, or is it just down to trail and error?

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,312
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: libqwt_designer_plugin.dylib - Not a valid plugin

    The plugin depends on the Qwt library - so the Creator also depends on it, when it wants to load the plugin. Is your environment ( library search path ) initialized properly when starting the Creator ?

    Uwe

  3. #3
    Join Date
    Jan 2011
    Posts
    12
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: libqwt_designer_plugin.dylib - Not a valid plugin

    Would one expect there to be a dylib in /usr/local/qt-6.0.1 as well? Otherwise, I guess it just needs to point to the relevant framework directory in /usr/local/qt-6.0.1/lib (/usr/local/qt-6.0.1/lib/qwt.framework)?

    I'm shockingly rusty with this stuff these days. Bad times.

  4. #4
    Join Date
    Jan 2011
    Posts
    12
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: libqwt_designer_plugin.dylib - Not a valid plugin

    I've set DYLD_LIBRARY_PATH to be /usr/local/qwt-6.0.1/lib/qwt.framework:/usr/local/qwt-6.0.1/lib/qwtmathml.framework, with no real change.

  5. #5
    Join Date
    Jan 2011
    Posts
    12
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: libqwt_designer_plugin.dylib - Not a valid plugin

    If I link the libraries like normal, I get:

    dyld: Library not loaded: qwt.framework/Versions/6/qwt
    Referenced from: /blah....
    Reason: image not found

    I guess there is a problem with how the libraries are linked?

  6. #6
    Join Date
    Oct 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libqwt_designer_plugin.dylib - Not a valid plugin

    Any progress on this? I have similar problem installing plugin into Qt Designer (I'm not using Qt Creator yet).

    I even did as Uwe suggests

    qmake
    make
    sudo make install

    (I added sudo part).
    I then copied the designer plugin to correct location in Qt, and copied qwt.framework to the Qt lib directory. I'm relatively new to Mac, so I'm sure it is something simple I've missed.

    I'm using Qt 4.7.4 built from source on OS X Lion and Qwt 6.0.1
    Last edited by gedrite; 10th March 2012 at 23:05.

  7. #7
    Join Date
    Jan 2011
    Posts
    12
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: libqwt_designer_plugin.dylib - Not a valid plugin

    Hey,

    In the end, it looks like permissions were my problem. Not sure how or why, as the install should have no effect, but in the end it just worked.

    How does your .pro look?

  8. #8
    Join Date
    Oct 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libqwt_designer_plugin.dylib - Not a valid plugin

    Not sure which .pro you mean (in src of plugin directory). However, I did not make any modifications to my .pro files before I built qwt.

    - I started with Qt 4.7.4 from the qt-everywhere-opensource-src-4.7.4.tar.gz download. I built Qt using all default settings, and installed to my /usr/local/ directory so my Qt installation is in /usr/local/Trolltech/Qt-4.7.4 directory.

    I then added the the path to my Qt install bin directory to my .bash_profile, so my system knows where my Qt apps are at when working in Terminal.

    Qt Designer works fine so far.

    - I then downloaded stable version of Qwt 6.0.1. I built and installed it using the following:
    qmake -spec macx-g++
    make
    sudo make install

    Qwt is now installed in /usr/local/qwt-6.0.1

    I then copied my qwt.framework and qwtmathml.framework from my Qwt install location to my Qt install location, putting them in the lib directory. I guessed I should do this... but don't know for sure. Perhaps I should be specifying this location somewhere else for linker?

    I then copied my libqwt_designer_plugin.dylib file to the Trolltech/Qt-4.7.4/plugins/designer directory.

    When I run Qt Designer, About Plugins tells me the Qwt plugin is not a valid plugin.

    That is all I know to do. I read about people making changes using otool to their libraries, but this is beyond me for now.

    Thanks.

  9. #9
    Join Date
    Oct 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libqwt_designer_plugin.dylib - Not a valid plugin

    Quote Originally Posted by gedrite View Post
    ...
    That is all I know to do. I read about people making changes using otool to their libraries, but this is beyond me for now.

    Thanks.
    Sometimes it helps to talk to myself.

    After using otool on my plugin, I've decided that my problem likely has to do with having wrong paths and id's in my plugin for the Qt Creator app bundle, and therefore I need to use otool and install_name_tool to patch things up to work right. Dear God, could this get a bit more complicated please? Yes, the instructions on the Qt site showing how to do this for Qwt5.2.1 are helpful, and I realize this is all for the best to ensure things work right. People complain of DLL Hell on Windows, but there is an equivalent on Mac (at least the burden is on the developer on the Mac, and not the end user). I guess I'm on the Mac learning curve ascent.... hope I make the top.

    Question for RobC... what path and file did you set your DYLD_LIBRARY_PATH in? launchd.conf ? Perhaps .profile ?

  10. #10
    Join Date
    Oct 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libqwt_designer_plugin.dylib - Not a valid plugin

    Quote Originally Posted by gedrite View Post
    .....
    After using otool on my plugin, I've decided that my problem likely has to do with having wrong paths and id's in my plugin for the Qt Creator app bundle, and therefore I need to use otool and install_name_tool to patch things up to work right.
    .....
    Progress.
    I did get the Qwt designer plugin appearing in Qt Creator. There are instructions on this in the Qt Creator help online, but here is a summary of what I did....

    Installed Qt SDK.
    Built Qwt 6.0.1
    Copied libqwt_designer_pligin.dylib from my qwt build into directory Qt Creator.app/Content/Plugins/designer
    Copied qwt.framework and qwtmathml.framework from my Qwt build into Qt Creator.app/Content/Frameworks

    Now, in my particular case, I had Qt 4.7.4 installed in /usr/local for some reason and built my Qwt against it. Therefore, running otool on my libqwt_designer_plugin.dylib showed paths for my Qt libraries as /usr/local/Trolltech/Qt-4.7.4/lib/....
    You may have your libraries installed somewhere else, so you need to run otool on your plugin to get the path locations it is referring to, and substitute them in for my path below. To run otool, cd to the directory containing your plugin. Then issue "otool -L libqwt_designer_plugin.dylib". My command and output was this:

    gedrite 38> otool -L libqwt_designer_plugin.dylib
    libqwt_designer_plugin.dylib:
    libqwt_designer_plugin.dylib (compatibility version 0.0.0, current version 0.0.0)
    qwt.framework/Versions/6/qwt (compatibility version 6.0.0, current version 6.0.1)
    /usr/local/Trolltech/Qt-4.7.4/lib/QtScript.framework/Versions/4/QtScript (compatibility version 4.7.0, current version 4.7.4)
    /usr/local/Trolltech/Qt-4.7.4/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.4)
    /usr/local/Trolltech/Qt-4.7.4/lib/QtXml.framework/Versions/4/QtXml (compatibility version 4.7.0, current version 4.7.4)
    /usr/local/Trolltech/Qt-4.7.4/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.4)
    /usr/local/Trolltech/Qt-4.7.4/lib/QtDesigner.framework/Versions/4/QtDesigner (compatibility version 4.7.0, current version 4.7.4)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)

    Ok, I think this is the exact procedure I used (I've pieced it together after I got everything working).
    I issue the next 6 commands to patch up the paths, relative to the executable path:

    Qt Code:
    1. sudo install_name_tool -change /usr/local/Trolltech/Qt-4.7.4/lib/QtScript.framework/Versions/4/QtScript @executable_path/../Frameworks/QtScript.framework/Versions/4/QtScript libqwt_designer_plugin.dylib
    2.  
    3. sudo install_name_tool -change /usr/local/Trolltech/Qt-4.7.4/lib/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore libqwt_designer_plugin.dylib
    4.  
    5. sudo install_name_tool -change /usr/local/Trolltech/Qt-4.7.4/lib/QtXml.framework/Versions/4/QtXml @executable_path/../Frameworks/QtXml.framework/Versions/4/QtXml libqwt_designer_plugin.dylib
    6.  
    7. sudo install_name_tool -change /usr/local/Trolltech/Qt-4.7.4/lib/QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui libqwt_designer_plugin.dylib
    8.  
    9. sudo install_name_tool -change /usr/local/Trolltech/Qt-4.7.4/lib/QtDesigner.framework/Versions/4/QtDesigner @executable_path/../Frameworks/QtDesigner.framework/Versions/4/QtDesigner libqwt_designer_plugin.dylib
    To copy to clipboard, switch view to plain text mode 


    Now, I need to patch up my qwt lib in Qt Creator.app/Contents/Frameworks/qwt.framework/Versions/6/ So, in Terminal cd to that location.
    Running otool on qwt gives me this:

    gedrite 58> otool -L qwt
    qwt:
    qwt.framework/Versions/6/qwt (compatibility version 6.0.0, current version 6.0.1)
    /usr/local/Trolltech/Qt-4.7.4/lib/QtSvg.framework/Versions/4/QtSvg (compatibility version 4.7.0, current version 4.7.4)
    /usr/local/Trolltech/Qt-4.7.4/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.4)
    /usr/local/Trolltech/Qt-4.7.4/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.4)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)

    To patch it up, I issued these commands:

    Qt Code:
    1. sudo install_name_tool -id @executable_path/../Frameworks/qwt.framework/Versions/6/qwt qwt
    2.  
    3. sudo install_name_tool -change /usr/local/Trolltech/Qt-4.7.4/lib/QtSvg.framework/Versions/4/QtSvg @executable_path/../Frameworks/QtSvg.framework/Versions/4/QtSvg qwt
    4.  
    5. sudo install_name_tool -change /usr/local/Trolltech/Qt-4.7.4/lib/QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui qwt
    6.  
    7. sudo install_name_tool -change /usr/local/Trolltech/Qt-4.7.4/lib/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore qwt
    To copy to clipboard, switch view to plain text mode 

    Regarding qwtmathml.framework, I am guessing you use the same procedure as you used for qwt, substituting the relevant dependencies of course.

    Now I have Qwt appearring in my Designer plugin in Qt Creator. I have not built any apps yet, so no idea if I got it all right.

Similar Threads

  1. .lib is not a valid Qt plugin
    By rickrvo in forum Qt for Embedded and Mobile
    Replies: 11
    Last Post: 21st May 2011, 23:18
  2. MacOS X libMylib.1.0.0.dylib
    By bunjee in forum Qt Programming
    Replies: 0
    Last Post: 9th September 2009, 11:00
  3. osx dylib frustration
    By gri in forum General Programming
    Replies: 3
    Last Post: 16th May 2009, 15:55
  4. dylib using qt
    By yogeshgokul in forum Installation and Deployment
    Replies: 0
    Last Post: 8th August 2008, 06:27
  5. creating a dylib for a plugin with external classes
    By themolecule in forum Qt Programming
    Replies: 4
    Last Post: 23rd July 2008, 14:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.