wiki:FAQ_runtime

Version 13 (modified by Marek Kurdej, 11 years ago) ( diff )

Fixed: imageformats.

Contents

  1. FAQ -- common run-time errors
    1. Plugin loader failure 1
    2. Plugin loader failure 2
    3. [Windows] [Qt5] Qt cannot find platform plugin "windows"
    4. [Windows] [Qt5]

FAQ -- common run-time errors

Plugin loader failure 1

Error message

000038 [2014-02-28 15:50:58.750509] <error> cannot load plugin 'PluginName.dll'. Plugin loader returned error: The shared library was not found.

Solution

See http://qt-project.org/doc/qt-5/deployment-plugins.html for more information about development of Qt plugins. You can set QT_DEBUG_PLUGINS environment variable to a non-zero value to see more information from plugin loader.

  1. Check if filename 'PluginName.dll' is correct in your XML file.
  2. Check if the correct version (release/debug) is used, see plugins postfix attribute in the XML.
  3. Check if this file exists in the same directory as the executable.

Plugin loader failure 2

Error message

000038 [2014-02-28 15:50:58.750509] <error> cannot load plugin 'PluginName.dll'. Plugin loader returned error: Cannot load library .//PluginName.dll: ...message in your language...

Solution

See http://qt-project.org/doc/qt-5/deployment-plugins.html for more information about development of Qt plugins. You can set QT_DEBUG_PLUGINS environment variable to a non-zero value to see more information from plugin loader.

  1. Check if this component CMakeLists.txt uses create_export and pacpus_plugin macros and that it adds generated files to the source file list, e.g.:
    create_export(EXPORT_HDR ${PROJECT_NAME})
    pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME})
    
    set(SRCS
        ${PLUGIN_CPP}
        ...
    )
    
  2. Check for the missing DLL's dependencies, other DLLs can be missing (verify it using e.g. DependencyWalker).
    [Windows] Copy DLLs to the application's folder or add their folder to PATH.
    [Unix] Make them visible to the linker.
  3. [Windows] Check if the .dll file exports any symbols (using e.g. DependencyWalker). At least qt_plugin_instance and qt_plugin_query_metadata should be visible exported symbols.
  4. Check if the application, the plugin and its dependencies have been built in the same release/debug version.
  5. Check if the application, the plugin and its dependencies have been built using the same compiler version.
    [Windows] Look for dependent DLLs like MSVCP110.dll or MSVCR110.dll, check that the version, here 11.0, corresponds with your compiler and the version used by other DLLs.

[Windows] [Qt5] Qt cannot find platform plugin "windows"

Error message

Solution

Copy folder "%QT_DIR%\plugins\platforms" to the folder where your application is executed (so that it has a subfolder "platforms").

[Windows] [Qt5]

Error message

001556 [2014-03-04 12:13:20.566213] <warning> cannot load image file 'd:/2011_09_14_15_28_12/ptgrey/image6.jpg'

Solution

Copy folder "%QT_DIR%\plugins\imageformats" to the folder where your application is executed (so that it has a subfolder "imageformats").

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.