Chris
Chris

Reputation: 61

How do i reference the qjson.dll file from my qt project?

How do I refernce the qjson.dll file from one of qt project?

For eg :C:\qjson-0.7.1\qjson\build\lib , in this location, I have qjson.dll and qjson.dll.a file. I want to use that dll from my qt project.How should I point to that location in that .pro file. I can't compile successful, the error that I got is C:/QTTest/foo/foo/main.cpp:6: error: Qjson/parser.h: No such file or directory .Can someone can help me?

Thx.

Upvotes: 3

Views: 5717

Answers (1)

Symbiosoft
Symbiosoft

Reputation: 4711

First, you have to tell QMake in your .pro where is located your header files using the INCLUDEPATH variable (please correct the path to point the location of your Qjson folder):

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

Second, you must specify your library and it's location using 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 the qjson.dll in the same directory as your Qt application or to add it's location in your PATH environment variable.

Upvotes: 5

Related Questions