How can I reference the qjson.dll file from my qt project?

How to transfer qjson.dll file from one of qt projects?

For example: C: \ qjson-0.7.1 \ qjson \ build \ lib, in this place I have the qjson.dll and qjson.dll.a files. I want to use this dll from my qt project. How should I point to this place in this .pro file. I can not compile the successful error I received C: /QTTest/foo/foo/main.cpp: 6: error: Qjson / parser.h: There is no such file or directory. Can someone help me?

thanks.

+3
source share
1 answer

First you must tell QMake in your .pro where your header files are located using the INCLUDEPATH variable (please correct the path to indicate the location of your Qjson folder):

INCLUDEPATH += "c:/qjson-0.7.1/include" 

Secondly, you must specify your library and its location using the LIBS variable:

 LIBS += "c:/qjson-0.7.1/qjson/build/lib/qjson.dll.a" 

Now QMake will find your header file and your library. You will need to have qjson.dll in the same directory as your Qt application, or add it to your PATH environment variable.

+5
source

Source: https://habr.com/ru/post/1300713/


All Articles