Home > Back-end >  Qt external libraries can not find the source file added
Qt external libraries can not find the source file added

Time:05-27

Himself wrote in VS using a library on the Qt, file path following
MyLib
|
| - SRC the source file
| - include the header file
. | - lib library file (lib)

Qt. Pro file to add storage
 
INCLUDEPATH +=$$PWD/include
LIBS +=$$PWD/lib/MyLib lib


But I find that if you do not add source files in the source file folder to. Pro file (SOURCES +=$$PWD/SRC/MyLib CPP), can't identify the definition of the function in the source file,
Excuse me, is only added to the source file. Pro file that a solution

CodePudding user response:

Can use Windows API LoadLibrary display loaded
Or
# pragma comment (lib, "netapi32. Lib")

CodePudding user response:

You write wrong
LIBS +=L $$PWD/lib/- lMyLib
  • Related