Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By jmg5150
#4228 I'm just starting to get my hands dirty with the new RTOS SDK that Espressif publish on github a few days ago. Has anyone tried using the included cJSON library with this SDK?

I've added "#include "json/cjson.h" to the top of user_main.c file, and added just this one line of code:
Code: Select allcJSON * rcvd_json = cJSON_Parse(recv_buf);


However when I compile I get: "undefined reference to cJSON_Parse"

Anyone have any tips on what I am forgetting to do to make this compile successfully? Any hints would be very much appreciated.
Thanks.
-Jonathan
User avatar
By jmg5150
#4254 Thanks for the link!

it's true that adding the json library to the makefile solved the problem. I added
Code: Select all-ljson   \

to the linkflags in the makefile in the app directory (beginning on line 61 with "LINKFLAGS_eagle.app.v6 "... ) and then was able to successfully compile.