library not found for -lcomponents
Solved
General and Desktop
-
Hello,
So, I tried to add qt-material-widgets to my project. In the beginning, everything worked fine, but when I restarted my laptop I got these errors:
error: library not found for -lcomponents error: linker command failed with exit code 1 (use -v to see invocation)
How I add these qt-material-widgets to my project:
- I downloaded files from the qt-material-widgets github
- I builder the qt-material-widgets.pro file
- Then I added components file and libcomponents.a file (from build-qt-material-widgets- file) to my project:
- And my last step was:
INCLUDEPATH += components/ LIBS += -L$$PWD/./ -lcomponents
What did I do wrong?
By the way, if i reinstall the qt-material-widgets and re-do these steps everything works fine, but if i turn off my laptop and then turn it back on, I am getting these errors again.
-
@privatepepper Since it's a static lib:
LIBS += $$PWD/libcomponents.a
-
Thanks for the help, I changed my code to:
LIBS += $$PWD/libcomponents.a
And now I am getting a new error:
error: no such file or directory: '/Users/L/Documents/C++/Projects/Sorting-Algorithms/Sorting_Algorithms/libcomponents.a/'
-
Hi,
From your picture, that file was not downloaded (see the cloud icon). Where exactly is it stored ?