Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. No such plugin: 'peakcan'
Forum Updated to NodeBB v4.3 + New Features

No such plugin: 'peakcan'

Scheduled Pinned Locked Moved Solved Installation and Deployment
14 Posts 2 Posters 820 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • rzuccaR Offline
    rzuccaR Offline
    rzucca
    wrote on last edited by
    #1

    Hi!

    I'm writing a program to flash firmware on a power module via CAN with peakcan.

    It works fine when I start it from Qt Creator

    10:51:09: Starting C:/Git/AB_Flasher/10_Dev/flasher/build-flasher_qt-Desktop_Qt_6_4_0_MinGW_64_bit-Release/release/flasher_qt.exe...
    qt.canbus.plugins.peakcan: Using PCAN-API version: 4.6.1.728
    

    But if I make a standalone app with windeployqt, it is unable to find the plugins

    10:53:29: Starting C:/Git/AB_Flasher/10_Dev/flasher/build-flasher_qt-Desktop_Qt_6_4_0_MinGW_64_bit-Release/release/flasher_qt.exe...
    "No such plugin: 'peakcan'"
    

    I'm using the following script to make the standalone application:

    set PATH=C:\Qt\6.4.0\mingw_64\bin;C:\Qt\Tools\mingw1120_64\bin;%PATH%
    cd /D C:\Qt\6.4.0\mingw_64
    .\bin\windeployqt.exe --plugindir $(TargetDir)\plugins C:\Git\AB_Flasher\10_Dev\flasher\build-flasher_qt-Desktop_Qt_6_4_0_MinGW_64_bit-Release\release
    .\bin\windeployqt.exe --libdir $(TargetDir)\lib C:\Git\AB_Flasher\10_Dev\flasher\build-flasher_qt-Desktop_Qt_6_4_0_MinGW_64_bit-Release\release
    

    This adds .dll's and subdirectories as expected, including a canbus subdirectory, containing

    -a----        23/09/2022     05:42          82880 qtpassthrucanbus.dll
    -a----        23/09/2022     05:42          64448 qtpeakcanbus.dll
    -a----        23/09/2022     05:42          56256 qtsysteccanbus.dll
    -a----        23/09/2022     05:42          56768 qttinycanbus.dll
    -a----        23/09/2022     05:42          60352 qtvectorcanbus.dll
    -a----        23/09/2022     05:42          63424 qtvirtualcanbus.dll
    

    Every time the file Qt6Core.dll is present in the release directory the program fails to find the plugins. If Qt6Core.dll is removed, the plugins are found. But then I can start my application only through QT creator

    Qt version and make environments I am using can be deduced from the name of my build directory, If you need more information please ask

    I got lost in the Qt documentation regarding plugins because they are much too advanced and abstract for me, lacking any concrete example pertaining PeakCAN

    Some help would be highly appreciated

    jsulmJ 1 Reply Last reply
    0
    • rzuccaR rzucca

      Hi!

      I'm writing a program to flash firmware on a power module via CAN with peakcan.

      It works fine when I start it from Qt Creator

      10:51:09: Starting C:/Git/AB_Flasher/10_Dev/flasher/build-flasher_qt-Desktop_Qt_6_4_0_MinGW_64_bit-Release/release/flasher_qt.exe...
      qt.canbus.plugins.peakcan: Using PCAN-API version: 4.6.1.728
      

      But if I make a standalone app with windeployqt, it is unable to find the plugins

      10:53:29: Starting C:/Git/AB_Flasher/10_Dev/flasher/build-flasher_qt-Desktop_Qt_6_4_0_MinGW_64_bit-Release/release/flasher_qt.exe...
      "No such plugin: 'peakcan'"
      

      I'm using the following script to make the standalone application:

      set PATH=C:\Qt\6.4.0\mingw_64\bin;C:\Qt\Tools\mingw1120_64\bin;%PATH%
      cd /D C:\Qt\6.4.0\mingw_64
      .\bin\windeployqt.exe --plugindir $(TargetDir)\plugins C:\Git\AB_Flasher\10_Dev\flasher\build-flasher_qt-Desktop_Qt_6_4_0_MinGW_64_bit-Release\release
      .\bin\windeployqt.exe --libdir $(TargetDir)\lib C:\Git\AB_Flasher\10_Dev\flasher\build-flasher_qt-Desktop_Qt_6_4_0_MinGW_64_bit-Release\release
      

      This adds .dll's and subdirectories as expected, including a canbus subdirectory, containing

      -a----        23/09/2022     05:42          82880 qtpassthrucanbus.dll
      -a----        23/09/2022     05:42          64448 qtpeakcanbus.dll
      -a----        23/09/2022     05:42          56256 qtsysteccanbus.dll
      -a----        23/09/2022     05:42          56768 qttinycanbus.dll
      -a----        23/09/2022     05:42          60352 qtvectorcanbus.dll
      -a----        23/09/2022     05:42          63424 qtvirtualcanbus.dll
      

      Every time the file Qt6Core.dll is present in the release directory the program fails to find the plugins. If Qt6Core.dll is removed, the plugins are found. But then I can start my application only through QT creator

      Qt version and make environments I am using can be deduced from the name of my build directory, If you need more information please ask

      I got lost in the Qt documentation regarding plugins because they are much too advanced and abstract for me, lacking any concrete example pertaining PeakCAN

      Some help would be highly appreciated

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @rzucca said in No such plugin: 'peakcan':

      subdirectories as expected

      What is inside plugins subfolder in deployed application?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • rzuccaR Offline
        rzuccaR Offline
        rzucca
        wrote on last edited by
        #3

        No plugins subfolder is created.

        jsulmJ 1 Reply Last reply
        0
        • rzuccaR rzucca

          No plugins subfolder is created.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @rzucca That explains your problem

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • rzuccaR Offline
            rzuccaR Offline
            rzucca
            wrote on last edited by
            #5

            Some explanations regarding the solution would be also highly appreciated

            Surely I'm overseeing something and/or making some mistake. I'd like to find out what.

            And above all, how to solve it

            jsulmJ 1 Reply Last reply
            0
            • rzuccaR rzucca

              Some explanations regarding the solution would be also highly appreciated

              Surely I'm overseeing something and/or making some mistake. I'd like to find out what.

              And above all, how to solve it

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @rzucca https://doc.qt.io/qt-6/windows-deployment.html explains how plug-in should be deployed. If no plug-ins where deployed with windeployqt then something went wrong.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • rzuccaR Offline
                rzuccaR Offline
                rzucca
                wrote on last edited by
                #7

                Believe me, I read this page many times, and even understood some of it.

                I couldn't understand how to build Qt statically, nor how to use the Q_IMPORT_PLUGIN() Macro

                Sorry for the delay in my answer, I'm only allowed to post something every 10 minutes

                jsulmJ 1 Reply Last reply
                0
                • rzuccaR rzucca

                  Believe me, I read this page many times, and even understood some of it.

                  I couldn't understand how to build Qt statically, nor how to use the Q_IMPORT_PLUGIN() Macro

                  Sorry for the delay in my answer, I'm only allowed to post something every 10 minutes

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @rzucca said in No such plugin: 'peakcan':

                  I couldn't understand how to build Qt statically

                  No need to build Qt statically and also Q_IMPORT_PLUGIN should not be needed.
                  All you need to do is to deploy needed plugins as shown in "Creating the Application Package" part of the link.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • rzuccaR Offline
                    rzuccaR Offline
                    rzucca
                    wrote on last edited by
                    #9

                    Any suggestions about how to do that? Because windeployqt isn't doing it

                    jsulmJ 1 Reply Last reply
                    0
                    • rzuccaR rzucca

                      Any suggestions about how to do that? Because windeployqt isn't doing it

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @rzucca You still can create subfolders by yourself and copy plug-ins there.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • rzuccaR Offline
                        rzuccaR Offline
                        rzucca
                        wrote on last edited by
                        #11

                        That's great news, thanks!

                        I just would like to know which plug-ins I need and where to find them

                        jsulmJ 1 Reply Last reply
                        0
                        • rzuccaR rzucca

                          That's great news, thanks!

                          I just would like to know which plug-ins I need and where to find them

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @rzucca said in No such plugin: 'peakcan':

                          I just would like to know which plug-ins I need

                          Depends on what app is using, on what platform, ...
                          Where to find: in your Qt installation.
                          Apparently you also need peakcan plug-in.

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          rzuccaR 1 Reply Last reply
                          1
                          • rzuccaR Offline
                            rzuccaR Offline
                            rzucca
                            wrote on last edited by
                            #13

                            Well, I'm using QT 6.4 on Windows 10. I think I just need the peakcan plug-in.

                            I already tried to copy the PCANBasic.dll to an handmade plugins subfolder, but to no avail. That's evidently not the component I'm looking for. The plug-in I need must be in the Qt folder, I guess, because Qt Creator can find it

                            I'm not (consciously) using any other external plug-ins or libraries. Am I missing any important piece of information?

                            1 Reply Last reply
                            0
                            • jsulmJ jsulm

                              @rzucca said in No such plugin: 'peakcan':

                              I just would like to know which plug-ins I need

                              Depends on what app is using, on what platform, ...
                              Where to find: in your Qt installation.
                              Apparently you also need peakcan plug-in.

                              rzuccaR Offline
                              rzuccaR Offline
                              rzucca
                              wrote on last edited by
                              #14

                              @jsulm There are three subfolders of Qt called plugin canbus. Their content seems to be identical, and the same that is added by windeployqt to the canbus subdirectory.

                              I tried to copy their content to a manually created plugin subfolder in the release, but to no avail

                              I am still stuck: I know that I must add some plugins to the release, but I still don't know what plugins, or where to find them

                              1 Reply Last reply
                              0

                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved