Important: Please read the Qt Code of Conduct -

Unresolved external symbol "class QObject * __cdecl qt_plugin_instance_pnp_basictools(void)" (?qt_plugin_instance_pnp_basictools@@YAPAVQObject@@XZ) re

  • I was compiling the examples in tools/plugandpaint, with vs2008 x86
    but things getting strange.
    This linkage error happens.
    I changed the file to
    symbian {
    LIBS = -lpnp_basictools.lib
    } else {
    QMAKE_LIBDIR += $$OUT_PWD/plugins
    LIBS = -lpnp_basictools

    if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
    mac:LIBS = $$member(LIBS, 0)_debug
    win32:LIBS = $$member(LIBS, 0)d
    about LIBS, or it's can not found the pnp_basictools.
    So I want to know what's happening about the linkage error.

  • Lifetime Qt Champion


    You have to first build the basic tool example

  • Yes, I build that first.
    And I found the binary that I build is less than the binary that QT-release
    provided, that's really confused me.
    Even in a rather simple staticLib-App demo,
    it's can not linkage the library. I don't know why,

  • When I build the pnp_basictools, size of the debug version:pnp_basictoolsd.lib is 263kb.
    and the binary that provided in the QT release binary is 316kb,
    I want to know what kinds of things will affect the binary size?

    And now the linkage error is happens.

  • Indeed, I use MSVC dumpbin to output the binary information,
    the information provided by QT-released binary is:
    F468 ?qt_plugin_instance_pnp_basictools@@YAPAVQObject@@XZ
    and the information provided by the binary that compiled with the project file by me is:
    DDA8 ?qt_plugin_instance_pnp_basictools@@YAPAVQObject@@XZ

    The only difference is F468 vs DDA8 and I really getting confused, and really mess me, I don't know why this happenning.

  • Lifetime Qt Champion

    Shot in the dark: is your Qt built with VS2008 ?

  • Yes, My Qt is build with vs 2008. I want to know if the Qt is using VS2008 sp1?

  • Now I found the reason to cause the issue,
    When I configuration the QT Creator Tool Kits (Compilers ,QT version)

    The name of the Tool Kits contains Chinese Characters,
    such as the name "桌面", then that will cause the problem I mentioned here
    and a another problem mentioned in

    So, the QT with Unicode support is not good enough under Win32.
    Because MSVC support for Unicode path is good, So the reason should be caused by QT. (to be exact, qmake).
    When I use qmake to genearte vs project file (qmake -tp vc)
    when the path contains Chinese characters such as "桌面", it's comes with
    the generated solution file with escape "??".
    This is an issue, and hope be fixed in future releases.
    I didn't test with QT 5.1.x yet, I'll try that latter.

  • Lifetime Qt Champion

    In that case, you could take a look at the "bugreport" system and report it if someone didn't already do that.

Log in to reply