Results 1 to 13 of 13

Thread: Qt Creator plugin is failing at startup with cannot load library;

  1. #1
    Join Date
    Apr 2014
    Posts
    125
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Question Qt Creator plugin is failing at startup with cannot load library;

    Hello;

    I wrote a Qt Creator plugin. For this purpose I had to compile Qt Creator from the sources. However I'm encountering this issue:

    1. Starting the plugin from the "compiled from the sources" Qt Creator works fine.

    2. Starting the plugin from the installed Qt Creator (from the official installation package) causes:
    Cannot load library myplugin.dll : the specified specified procedure could not be found.

    Thanks for any help;

    Mut.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Qt Creator plugin is failing at startup with cannot load library;

    Are you using the same compiler (provider, version and bit-ness) as was used to build the binary Qt Creator you are targeting? On Windows this will be a version of Microsoft's compiler (not MingW) that you can see in the Help About dialog.

  3. #3
    Join Date
    Apr 2014
    Posts
    125
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Qt Creator plugin is failing at startup with cannot load library;

    Thanks for the reply.
    I'm working on Windows. My Qt Creator sources (sources for Qt Creator 3.0.0) were compiled with MingW. My plugin works fine with the QCreator exe resulting from this compilation. The installed Qt Creator is also version 3.0.0 and Qt is version 5.2.0.

    Qt Creator sources: http://download.qt-project.org/offic...tor/3.0/3.0.0/
    Qt 5.2.0 with installed Qt Creator application and MingW: http://download.qt-project.org/archi...86-offline.exe
    Sample Qt Creator plugin used to build my own plugin: http://doc.qt.digia.com/qtcreator-ex...st-plugin.html


    Added after 39 minutes:


    Inserted images are the two Qt Creators. The one from the source used MingW while the other used MSVC.
    Qt Creator installed from the installation package.gif
    Qt Creator built from the sources.gif
    Last edited by mut; 19th June 2014 at 16:38.

  4. #4
    Join Date
    Sep 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt Creator plugin is failing at startup with cannot load library;

    The provided QtCreator from the official releases is compiled with a Visual Studio compiler. So you need to use the same. You can check that with dependency walker: http://www.dependencywalker.com/

    With that tool you can see a dependency to msvcr100.dll which means it was built with Visual Studio 2010.

    So to be able to build a plugin against a fresh QtCreator on Windows you need a Visual Studio 2010 with all updates/service packs and then you need a Qt with the same configuration how the QtCreator was built.
    You can try to get this configuration from the build scripts https://github.com/qtproject/qtsdk. Or you can just use the Qt which comes with the installer, which was the used Qt to build QtCreator some weeks ago when I checked that.

  5. #5
    Join Date
    Apr 2014
    Posts
    125
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Qt Creator plugin is failing at startup with cannot load library;

    How to use the build script?
    Again I'm trying to compile Qt Creator 3.0.0. I have followed what you said and switched to MSVC. However, I'm having this problem:


    Why it is not working?

    I have installed MSVC Express 2010

    I have put qt here: C:\Qt\Qt5.3.0

    I have put Qt Creator sources here: C:\work\qt-creator-opensource-src-3.0.0

    My windows path is:
    C:\Qt\Qt5.3.0\5.3\msvc2010_opengl\bin;
    C:\Perl64\bin;
    C:\jom
    Perl and Jom are both installed and in the Windows path:

    When going into the Visual C++ Express DOS prompt and navigating where my Qt Creator project is, I type:


    C:\work\qt-creator-opensource-src-3.0.0>configure -developer-build && jom
    'configure' is not recognized as an internal or external command,
    operable program or batch file.


    Configure is not recognize.

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt Creator plugin is failing at startup with cannot load library;

    Are you sure Qt Creator has a configure script?

    My README says to run qmake -r and then make (in your case nmake)

    Cheers,
    _

  7. #7
    Join Date
    Apr 2014
    Posts
    125
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Qt Creator plugin is failing at startup with cannot load library;

    No, it does not have configure script. How to get configure.bat?


    Added after 17 minutes:


    I have run qmake -r on the .proj and have obtained the Makefile

    However, On “Visual Studio x64 Win64 Command Prompt (2010)”
    command prompt (in Start > Programs > Microsoft Visual Studio 2010 > Visual Studio Tools:

    C:\work\qt-creator-opensource-src-3.0.0>nmake

    Microsoft (R) Program Maintenance Utility Version 10.00.40219.01
    Copyright (C) Microsoft Corporation. All rights reserved.

    NMAKE : fatal error U1065: invalid option '-'
    Stop.

    C:\work\qt-creator-opensource-src-3.0.0>
    Last edited by mut; 24th June 2014 at 14:40.

  8. #8
    Join Date
    Apr 2014
    Posts
    125
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Qt Creator plugin is failing at startup with cannot load library;

    1. These are the failures that I'm encountering:

    C:\work\qt-creator-opensource-src-3.0.0>nmake

    Microsoft (R) Program Maintenance Utility Version 10.00.40219.01
    Copyright (C) Microsoft Corporation. All rights reserved.

    NMAKE : fatal error U1065: invalid option '-'
    Stop.

    C:\work\qt-creator-opensource-src-3.0.0>env -u MAKE -u MAKEFLAGS nmake.exe /a /l

    Microsoft (R) Program Maintenance Utility Version 10.00.40219.01
    Copyright (C) Microsoft Corporation. All rights reserved.

    NMAKE : fatal error U1073: don't know how to make 'C:/QNX650/host/win32/x86/usr/a' Stop.

    C:\work_msvc\qt-creator-opensource-src-3.0.0>configure -developer-build -opensource -prefix C:\Qt\Qt5.2.0

    'configure' is not recognized as an internal or external command,
    operable program or batch file.

    C:\work_msvc\qt-creator-opensource-src-3.0.0>nmake release

    Microsoft (R) Program Maintenance Utility Version 10.00.40219.01
    Copyright (C) Microsoft Corporation. All rights reserved.

    NMAKE : fatal error U1065: invalid option '-'
    Stop.

    2. When compiling the sources of my plugin: should my Qt Creator kit be pointing to MSVC instead Ming?


    Added after 17 minutes:


    3. How to change MAKE and MAKEFLAGS to point to my installed MSVC?
    Last edited by mut; 24th June 2014 at 17:09.

  9. #9
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt Creator plugin is failing at startup with cannot load library;

    Maybe you ran the wrong qmake, i.e. not the one from your Qt compiled with MSVC

    Cheers,
    _

  10. #10
    Join Date
    Apr 2014
    Posts
    125
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Qt Creator plugin is failing at startup with cannot load library;

    Is it not that I'm not pointing to MSVC by using 'C:/QNX650/host/win32/x86/usr/a'

  11. #11
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt Creator plugin is failing at startup with cannot load library;

    Are you sure that is your installation of Qt built with MSVC?

    The path looks like the host tools from a QNX SDK.

    Cheers,
    _

  12. #12
    Join Date
    Apr 2014
    Posts
    125
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Qt Creator plugin is failing at startup with cannot load library;

    I have put my Qt at C:/Qt/Qt5.2.0

    How to set MAKEFLAGS

  13. #13
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt Creator plugin is failing at startup with cannot load library;

    Quote Originally Posted by mut View Post
    I have put my Qt at C:/Qt/Qt5.2.0
    Well, the qmake you ran is obviously from a different path.
    Run the correct qmake

    Cheers,
    _

Similar Threads

  1. Replies: 11
    Last Post: 5th July 2011, 11:11
  2. Replies: 5
    Last Post: 6th January 2011, 13:32
  3. Replies: 1
    Last Post: 18th December 2010, 11:05
  4. Qt Creator doesn't load nested plugin
    By skepticalgeek in forum Qt Tools
    Replies: 0
    Last Post: 9th January 2010, 21:10
  5. QT Creator crashed on startup
    By eloos in forum Qt Tools
    Replies: 13
    Last Post: 20th November 2009, 08:50

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.