Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: cjson/cJSON.h: No such file or directory #3180

Open
yooo1999 opened this issue Dec 4, 2024 · 2 comments
Open

fatal error: cjson/cJSON.h: No such file or directory #3180

yooo1999 opened this issue Dec 4, 2024 · 2 comments
Labels
Status: Available No one has claimed responsibility for resolving this issue.

Comments

@yooo1999
Copy link

yooo1999 commented Dec 4, 2024

When build in Linux system I got

fatal error: cjson/cJSON.h: No such file or directory
#  include <cjson/cJSON.h>

sudo apt install libcjson1 libcjson-dev
Fix the problem

maybe add that or validate that using Makefile ?

@github-actions github-actions bot added the Status: Available No one has claimed responsibility for resolving this issue. label Dec 4, 2024
@B9eirzhiu
Copy link

I have the same issue

@ckrey
Copy link
Contributor

ckrey commented Dec 11, 2024

To @yooo1999 and @B9eirzhiu the problem can be solved by reading the README or adapting the configuration:

The necessary packages are described inREADME-compiling.md:

* cJSON (optional but recommended, for dynamic-security plugin support, and
  JSON output from mosquitto_sub/mosquitto_rr)
 ...
 To compile, run "make", but also see the file config.mk for more details on the
various options that can be compiled in.

and use of cJSON can be configured in config.mk:

 # Build mosquitto_sub with cJSON support
WITH_CJSON:=yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Available No one has claimed responsibility for resolving this issue.
Projects
None yet
Development

No branches or pull requests

3 participants