Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Plugin compiled name does not match specified name



  • I have created a new plugin to communicate with a oscilloscope (PicoScope). I started the plugin by copying the project of another plugin. I have specified the new plugin name in the .pro file as follows:

    TARGET          = $$qtLibraryTarget(PicoScopePlugin)
    

    The plugin compiles and I see the following messages in the Compile Output:

    rm -f libPicoScopePlugin_debug.dylib
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9  -Wl,-rpath,/Applications/QT/5.8/clang_64/lib -single_module -dynamiclib -o libPicoScopePlugin_debug.dylib busyindicator.o picoscopeplugin.o qrc_icons.o moc_busyindicator.o moc_picoscopeplugin.o  -F/Applications/QT/5.8/clang_64/lib -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework QtNetwork -framework OpenGL -framework AGL  
    mv -f libPicoScopePlugin_debug.dylib ../../../plugins/
    

    In the target directory, I find the file SineDrawerPlugin_debug.dylib and not PicoScopePlugin_debug.dylib as I expect. When I delete the file and re-compile, the plugin gets re-created as such. I searched for the text "drawer" in the entire project directory and can't find that text.
    Can anyone tell me the the plugin can be compiled with the wrong name?


  • Qt Champions 2017

    Just try set the target like this and see what happens.
    TARGET=mgreenish


  • Lifetime Qt Champion

    Hi,

    @mgreenish said in Plugin compiled name does not match specified name:

    mv -f libPicoScopePlugin_debug.dylib ../../../plugins/

    Are you sure that path does indeed go to the correct place ?

    Did you try to search your computer for libPicoScopePlugin_debug.dylib ?



  • So changing the target to mgreenish helped me find my mistake. Indeed, the compiled plugin was not being put where I though. However, I did delete the SineDrawer_debug.dylib from the plugins directory where I wanted it to go several times and upon recompiling, it would reappear. Of course, it could have been my cloud server playing tricks on me and putting the file back rather than QT Designer.

    Thanks to both for your help !


Log in to reply