Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. (Re)building Qt plugin libraries from source
QtWS25 Last Chance

(Re)building Qt plugin libraries from source

Scheduled Pinned Locked Moved Unsolved General and Desktop
plugins
5 Posts 2 Posters 1.5k 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.
  • V Offline
    V Offline
    Vagabond
    wrote on 18 Jun 2018, 13:56 last edited by
    #1

    Hi all,

    I have just recently worked with the tuiotouch plugin (included in Qt since 5.5). I would like to apply some adjustments to it and would therefore have to rebuild the plugin .dll. I was hoping that I would be able to simply use the project file @ C:\Qt<version>\Src\qtbase\src\plugins\generic\tuiotouch\tuiotouch.pro and build it to create a new dynamic library. Unfortunately, building only produces a shadow built folder with the following structure:

    .moc/
    .obj/
    .pch/
    Makefile
    Makefile.Debug
    Makefile.Release
    qtuiotouchplugin_resource.rc
    qtuiotouchplugind_resource.rc
    

    None of the folders above contain the .dll and I am left wondering how to achieve what I am looking for. Right now I am building the entire source code using C:\Qt<version>\Src\qt.pro. I am expecting this will produce the .dll, because the source tree it is generating looks much like the default binary distributed version.

    Is there an easy way to build only the plugin, as mentioned above?

    S 1 Reply Last reply 18 Jun 2018, 20:10
    0
    • V Vagabond
      18 Jun 2018, 13:56

      Hi all,

      I have just recently worked with the tuiotouch plugin (included in Qt since 5.5). I would like to apply some adjustments to it and would therefore have to rebuild the plugin .dll. I was hoping that I would be able to simply use the project file @ C:\Qt<version>\Src\qtbase\src\plugins\generic\tuiotouch\tuiotouch.pro and build it to create a new dynamic library. Unfortunately, building only produces a shadow built folder with the following structure:

      .moc/
      .obj/
      .pch/
      Makefile
      Makefile.Debug
      Makefile.Release
      qtuiotouchplugin_resource.rc
      qtuiotouchplugind_resource.rc
      

      None of the folders above contain the .dll and I am left wondering how to achieve what I am looking for. Right now I am building the entire source code using C:\Qt<version>\Src\qt.pro. I am expecting this will produce the .dll, because the source tree it is generating looks much like the default binary distributed version.

      Is there an easy way to build only the plugin, as mentioned above?

      S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 18 Jun 2018, 20:10 last edited by
      #2

      @Vagabond said in (Re)building Qt plugin libraries from source:

      Is there an easy way to build only the plugin, as mentioned above?

      I don't think so. It is possible for SQL plugins, but apparently not for this one. You need to (at least) configure Qt and compile qtbase - then you'll be able to compile the plugin only.

      A guide for building Qt can be found here: https://wiki.qt.io/Building_Qt_5_from_Git Since you already have the source code, you can probably skip the part about getting it from git.

      (Z(:^

      V 1 Reply Last reply 19 Jun 2018, 15:12
      2
      • V Offline
        V Offline
        Vagabond
        wrote on 19 Jun 2018, 12:02 last edited by Vagabond
        #3

        @sierdzio Great answer! Thanks a bunch. I am on it right now.

        1 Reply Last reply
        1
        • S sierdzio
          18 Jun 2018, 20:10

          @Vagabond said in (Re)building Qt plugin libraries from source:

          Is there an easy way to build only the plugin, as mentioned above?

          I don't think so. It is possible for SQL plugins, but apparently not for this one. You need to (at least) configure Qt and compile qtbase - then you'll be able to compile the plugin only.

          A guide for building Qt can be found here: https://wiki.qt.io/Building_Qt_5_from_Git Since you already have the source code, you can probably skip the part about getting it from git.

          V Offline
          V Offline
          Vagabond
          wrote on 19 Jun 2018, 15:12 last edited by Vagabond
          #4

          @sierdzio Getting closer. Currently the build fails stating:

          In member function 'virtual QSize QWindowsVistaStyle::sizeFromContents(QStyle::ContentsType, const QStyleOption*, const QSize&, const QWidget*) const':
          styles\qwindowsvistastyle.cpp:1872:9: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
                   if (!sz.isEmpty())
                   ^~
          styles\qwindowsvistastyle.cpp:1874:13: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
                       return sz;
                       ^~~~~~
          cc1plus.exe: all warnings being treated as errors
          

          I am having a hard time maneuvering around the extensive build structure...
          Can I configure the build pipeline not to treat warnings as errors? If yes, where would I do that?

          I found that -Wall -Werror -Wno-error=misleading-indentation might do the trick. I just don't know where to set it.

          EDIT: found that the configure cmd tool offers a -warnings-are-errors option, which defaults to yes when using -developer-build else it defaults to no. The problem is I cannot call configure -developer-build -opensource -nomake examples -nomake tests -opengl desktop -warnings-are-errors no. Configure will stop stating ERROR: Invalid command line parameter 'no'. I am now configuring without -developer-build just to see if that works. Any input would still be appreciated.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sierdzio
            Moderators
            wrote on 20 Jun 2018, 06:03 last edited by
            #5

            You should only use -developer-build is you plant to contribute to Qt. If you're building for yourself, there is no need to add that flag.

            (Z(:^

            1 Reply Last reply
            0

            3/5

            19 Jun 2018, 12:02

            • Login

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