how to add external library on windows in qt
-
wrote on 30 Aug 2024, 05:49 last edited by
-
wrote on 30 Aug 2024, 06:40 last edited by Bonnie
You are not using the add library wizard correctly.
According to you current content, I suppose you should write like this:LIBS += -L$$PWD/../../Downloads/libusb-1.0.27/MinGW32/static -llibusb-1.0.dll INCLUDEPATH += $$PWD/../../Downloads/libusb-1.0.27/include
I use this
MinGW32/static
path because I downloadlibusb-1.0.27.7z
from github and there'slibusb-1.0.dll.a
file in that folder, right?
Actually the comments in you .pro already shows you the necessary variables need to be set, you just need to change the folder path and library file name.
And if you want to link the static library you should change-llibusb-1.0.dll
to-llibusb-1.0
-
wrote on 31 Aug 2024, 15:17 last edited by
-
You are not using the add library wizard correctly.
According to you current content, I suppose you should write like this:LIBS += -L$$PWD/../../Downloads/libusb-1.0.27/MinGW32/static -llibusb-1.0.dll INCLUDEPATH += $$PWD/../../Downloads/libusb-1.0.27/include
I use this
MinGW32/static
path because I downloadlibusb-1.0.27.7z
from github and there'slibusb-1.0.dll.a
file in that folder, right?
Actually the comments in you .pro already shows you the necessary variables need to be set, you just need to change the folder path and library file name.
And if you want to link the static library you should change-llibusb-1.0.dll
to-llibusb-1.0
wrote on 31 Aug 2024, 15:29 last edited by@Bonnie Thanks for you valuable response.
1/4