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. I can't link the libusb library and change UI
Forum Updated to NodeBB v4.3 + New Features

I can't link the libusb library and change UI

Scheduled Pinned Locked Moved Solved General and Desktop
13 Posts 4 Posters 1.5k Views 1 Watching
  • 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.
  • jsulmJ jsulm

    @Andrew23 said in I can't link the libusb library and change UI:

    The only thing that I changed after that was the build directory and nothing else

    Where is the build directory? Is it inside project directory?

    A Offline
    A Offline
    Andrew23
    wrote on last edited by
    #3

    @jsulm said in I can't link the libusb library and change UI:

    @Andrew23 said in I can't link the libusb library and change UI:

    The only thing that I changed after that was the build directory and nothing else

    Where is the build directory? Is it inside project directory?

    No, it's outside. The project's directory is .../QtProjects/MyProject and the build directory is .../QtProjects/build-MyProject-Desktop_Qt_5_15_2_MinGW_64_bit-Debug.

    aha_1980A 1 Reply Last reply
    0
    • A Andrew23

      @jsulm said in I can't link the libusb library and change UI:

      @Andrew23 said in I can't link the libusb library and change UI:

      The only thing that I changed after that was the build directory and nothing else

      Where is the build directory? Is it inside project directory?

      No, it's outside. The project's directory is .../QtProjects/MyProject and the build directory is .../QtProjects/build-MyProject-Desktop_Qt_5_15_2_MinGW_64_bit-Debug.

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @Andrew23 Make sure you don't have stall Makefile or generated ui_xxx.h files anywhere in your source or build folder.

      You problems sounds to 99% like that.

      Qt has to stay free or it will die.

      A 1 Reply Last reply
      2
      • aha_1980A aha_1980

        @Andrew23 Make sure you don't have stall Makefile or generated ui_xxx.h files anywhere in your source or build folder.

        You problems sounds to 99% like that.

        A Offline
        A Offline
        Andrew23
        wrote on last edited by Andrew23
        #5

        @aha_1980 said in I can't link the libusb library and change UI:

        @Andrew23 Make sure you don't have stall Makefile or generated ui_xxx.h files anywhere in your source or build folder.

        You problems sounds to 99% like that.

        In my source folder ( .../QtProjects/MyProject ) I haven't any Makefile or ui_xxx.h, just my c++ and ui source files. But in the build folder ( .../QtProjects/build-MyProject-Desktop_Qt_5_15_2_MinGW_64_bit-Debug ) I have these files

        Immagine 2021-01-19 105027.png

        jsulmJ J.HilkJ 3 Replies Last reply
        0
        • A Andrew23

          @aha_1980 said in I can't link the libusb library and change UI:

          @Andrew23 Make sure you don't have stall Makefile or generated ui_xxx.h files anywhere in your source or build folder.

          You problems sounds to 99% like that.

          In my source folder ( .../QtProjects/MyProject ) I haven't any Makefile or ui_xxx.h, just my c++ and ui source files. But in the build folder ( .../QtProjects/build-MyProject-Desktop_Qt_5_15_2_MinGW_64_bit-Debug ) I have these files

          Immagine 2021-01-19 105027.png

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #6
          This post is deleted!
          1 Reply Last reply
          0
          • A Andrew23

            @aha_1980 said in I can't link the libusb library and change UI:

            @Andrew23 Make sure you don't have stall Makefile or generated ui_xxx.h files anywhere in your source or build folder.

            You problems sounds to 99% like that.

            In my source folder ( .../QtProjects/MyProject ) I haven't any Makefile or ui_xxx.h, just my c++ and ui source files. But in the build folder ( .../QtProjects/build-MyProject-Desktop_Qt_5_15_2_MinGW_64_bit-Debug ) I have these files

            Immagine 2021-01-19 105027.png

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

            @Andrew23 Is this the same build folder you used before you copied the project?

            A 1 Reply Last reply
            0
            • jsulmJ jsulm

              @Andrew23 Is this the same build folder you used before you copied the project?

              A Offline
              A Offline
              Andrew23
              wrote on last edited by
              #8

              @jsulm said in I can't link the libusb library and change UI:

              @Andrew23 Is this the same build folder you used before you copied the project?

              The original project's folders are

              .../QtProjects/Test/MyOriginalProject
              .../QtProjects/Test/build-MyOriginalProject-Desktop_Qt_5_15_2_MinGW_64_bit-Debug

              now my copied project folders are

              .../QtProjects/MyProject/MyNewQtProject
              .../QtProjects/MyProject/build-MyNewQtProject-Desktop_Qt_5_15_2_MinGW_64_bit-Debug

              When I created the original project the framework choose the build forlder by default. When I copied the project in the new folder I inherited that and I changed it.

              aha_1980A 1 Reply Last reply
              0
              • A Andrew23

                @jsulm said in I can't link the libusb library and change UI:

                @Andrew23 Is this the same build folder you used before you copied the project?

                The original project's folders are

                .../QtProjects/Test/MyOriginalProject
                .../QtProjects/Test/build-MyOriginalProject-Desktop_Qt_5_15_2_MinGW_64_bit-Debug

                now my copied project folders are

                .../QtProjects/MyProject/MyNewQtProject
                .../QtProjects/MyProject/build-MyNewQtProject-Desktop_Qt_5_15_2_MinGW_64_bit-Debug

                When I created the original project the framework choose the build forlder by default. When I copied the project in the new folder I inherited that and I changed it.

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #9

                @Andrew23

                Close Qt Creator, delete the .pro.user file and the build folder, then open the project again and rebuild it.

                Qt has to stay free or it will die.

                A 1 Reply Last reply
                1
                • A Andrew23

                  @aha_1980 said in I can't link the libusb library and change UI:

                  @Andrew23 Make sure you don't have stall Makefile or generated ui_xxx.h files anywhere in your source or build folder.

                  You problems sounds to 99% like that.

                  In my source folder ( .../QtProjects/MyProject ) I haven't any Makefile or ui_xxx.h, just my c++ and ui source files. But in the build folder ( .../QtProjects/build-MyProject-Desktop_Qt_5_15_2_MinGW_64_bit-Debug ) I have these files

                  Immagine 2021-01-19 105027.png

                  J.HilkJ Offline
                  J.HilkJ Offline
                  J.Hilk
                  Moderators
                  wrote on last edited by
                  #10

                  @Andrew23 also delete the .qmake.stash file


                  Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                  Q: What's that?
                  A: It's blue light.
                  Q: What does it do?
                  A: It turns blue.

                  1 Reply Last reply
                  1
                  • aha_1980A aha_1980

                    @Andrew23

                    Close Qt Creator, delete the .pro.user file and the build folder, then open the project again and rebuild it.

                    A Offline
                    A Offline
                    Andrew23
                    wrote on last edited by Andrew23
                    #11

                    @aha_1980 said in I can't link the libusb library and change UI:

                    @Andrew23

                    Close Qt Creator, delete the .pro.user file and the build folder, then open the project again and rebuild it.

                    @J-Hilk said in I can't link the libusb library and change UI:

                    @Andrew23 also delete the .qmake.stash file

                    Thanks guys. I deleted the build folder (where is .qmake.stash) and the .pro.user file in the source directory, and now I can modify my User Interface. But the other strange behaviour about the libusb library remains: if I modify my code I get the error

                    warning: ignoring #pragma warning  [-Wunknown-pragmas]
                    warning: ignoring #pragma warning  [-Wunknown-pragmas]
                    warning: ignoring #pragma warning  [-Wunknown-pragmas]
                    error: skipping incompatible D:\Documenti\Qt\ProgettoAudiometro\Evometer/libusb-1.0.lib when searching for -llibusb-1.0
                    

                    but if I rebuild again the project, it works without errors. So I get the error only the first build after a change. Now, I can live with it, but how I can fix it?

                    aha_1980A 1 Reply Last reply
                    0
                    • A Andrew23

                      @aha_1980 said in I can't link the libusb library and change UI:

                      @Andrew23

                      Close Qt Creator, delete the .pro.user file and the build folder, then open the project again and rebuild it.

                      @J-Hilk said in I can't link the libusb library and change UI:

                      @Andrew23 also delete the .qmake.stash file

                      Thanks guys. I deleted the build folder (where is .qmake.stash) and the .pro.user file in the source directory, and now I can modify my User Interface. But the other strange behaviour about the libusb library remains: if I modify my code I get the error

                      warning: ignoring #pragma warning  [-Wunknown-pragmas]
                      warning: ignoring #pragma warning  [-Wunknown-pragmas]
                      warning: ignoring #pragma warning  [-Wunknown-pragmas]
                      error: skipping incompatible D:\Documenti\Qt\ProgettoAudiometro\Evometer/libusb-1.0.lib when searching for -llibusb-1.0
                      

                      but if I rebuild again the project, it works without errors. So I get the error only the first build after a change. Now, I can live with it, but how I can fix it?

                      aha_1980A Offline
                      aha_1980A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      @Andrew23 said in I can't link the libusb library and change UI:
                      Hi @Andrew23,

                      I think:

                      warning: ignoring #pragma warning [-Wunknown-pragmas]
                      warning: ignoring #pragma warning [-Wunknown-pragmas]
                      warning: ignoring #pragma warning [-Wunknown-pragmas]

                      and

                      error: skipping incompatible D:\Documenti\Qt\ProgettoAudiometro\Evometer/libusb-1.0.lib when searching for -llibusb-1.0

                      are two different warnings.

                      Have you made sure that the libusb at the mentioned path has a compatible architecture (32 or 64 bit)?

                      Regards

                      Qt has to stay free or it will die.

                      A 1 Reply Last reply
                      0
                      • aha_1980A aha_1980

                        @Andrew23 said in I can't link the libusb library and change UI:
                        Hi @Andrew23,

                        I think:

                        warning: ignoring #pragma warning [-Wunknown-pragmas]
                        warning: ignoring #pragma warning [-Wunknown-pragmas]
                        warning: ignoring #pragma warning [-Wunknown-pragmas]

                        and

                        error: skipping incompatible D:\Documenti\Qt\ProgettoAudiometro\Evometer/libusb-1.0.lib when searching for -llibusb-1.0

                        are two different warnings.

                        Have you made sure that the libusb at the mentioned path has a compatible architecture (32 or 64 bit)?

                        Regards

                        A Offline
                        A Offline
                        Andrew23
                        wrote on last edited by Andrew23
                        #13

                        @aha_1980 said in I can't link the libusb library and change UI:

                        @Andrew23 said in I can't link the libusb library and change UI:
                        Hi @Andrew23,

                        I think:

                        warning: ignoring #pragma warning [-Wunknown-pragmas]
                        warning: ignoring #pragma warning [-Wunknown-pragmas]
                        warning: ignoring #pragma warning [-Wunknown-pragmas]

                        and

                        error: skipping incompatible D:\Documenti\Qt\ProgettoAudiometro\Evometer/libusb-1.0.lib when searching for -llibusb-1.0

                        are two different warnings.

                        Have you made sure that the libusb at the mentioned path has a compatible architecture (32 or 64 bit)?

                        Regards

                        Yes @aha_1980 it was my mistake. I just updated the libusb files downloaded from their website and now all works fine. Thanks a lot.

                        1 Reply Last reply
                        1

                        • Login

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