Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a library in Qt Creator without .lib or .dll file

Tags:

c++

qt

I'm trying to add a external library into my project in Qt Creator. Usually I am supposed to add the .dll, .lib or .a file (I am using Windows) when right-clicking my project > add library but in my case, there is no such file in the folder. Am I just blind and I keep overseeing it or do I have to create the file on my own or something like that? I would appreciate if there's a detailed solution for my problem.

like image 564
Schulp Avatar asked Nov 17 '25 08:11

Schulp


1 Answers

As already mentioned in comments, this is a header-only library.

You have a ArduinoJson.h file in the root of the repository that seems to include the whole library. You just have to #include it where needed and that should work.

If you don't want to #include with the full path, you can set the INCLUDEPATH variable in your .pro file (details here).

For example:

.pro

INCLUDEPATH += path/to/ArduinoJson/

implementation

#include <ArduinoJson.h>
like image 150
Fareanor Avatar answered Nov 20 '25 00:11

Fareanor