Unsolved Compiler can't find the library.
-
I compiled one library, i put the .a files into libs, i also add the includes to correct folder.
Then i start a new project, include the stuff into it, then add any random function from the library, and of course it doesn't work. I also follow few tutorials on youtube, and there it does work. What is wrong? There is no error what so ever, just "Undefined reference to" and the function name. The functions are available, also the header files are accessible.
-
Hi
Did you also add something like
LIBS += -L$$PWD/build-MyLibrary/ -lmylibraryto the .pro file to link to your lib ?
-
@mrjj No, no one said i should do it, from what i can see, they just put the libs and includes, and that's it.
-
@Loc888
Hi
Im not sure why it was not mentioned to link to your new lib.But the error "Undefined reference to" suggest that is needed.
https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application