Solved I can't link the libusb library and change UI
-
@Andrew23 Make sure you don't have stall
Makefile
or generatedui_xxx.h
files anywhere in your source or build folder.You problems sounds to 99% like that.
-
@aha_1980 said in I can't link the libusb library and change UI:
@Andrew23 Make sure you don't have stall
Makefile
or generatedui_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
orui_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 -
This post is deleted! -
@Andrew23 Is this the same build folder you used before you copied the project?
-
@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.
-
Close Qt Creator, delete the
.pro.user
file and the build folder, then open the project again and rebuild it. -
@Andrew23 also delete the .qmake.stash file
-
@aha_1980 said in I can't link the libusb library and change UI:
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 errorwarning: 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?
-
@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
-
@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.