Ai-Thinker-Open / GPRS_C_SDK

Ai-Thinker A9/A9G GPRS (with GPS(A9G)) module C development SDK
https://ai-thinker-open.github.io/GPRS_C_SDK_DOC
MIT License
449 stars 236 forks source link

cJSON依赖头文件 #56

Closed roamboy closed 6 years ago

roamboy commented 6 years ago

可否提供cJSON依赖的标准头文件 math.h, float.h, limits.h

roamboy commented 6 years ago

报个cJSON链接问题 /cygdrive/d/Workspace/Src/A9G/gprs_c_sdk/build/gw/gw/lib/libgw_debug.a(gw_main.o): In function print_number': /cygdrive/d/Workspace/Src/A9G/gprs_c_sdk/gw/src/utils/cJSON/cJSON.c:502: undefined reference tosscanf' value:0, p:ffffffff8824135c, addend:0, symbol:0 /cygdrive/d/Workspace/Src/A9G/gprs_c_sdk/gw/src/utils/cJSON/cJSON.c:502: relocation truncated to fit: R_MIPS16_26 against sscanf' /cygdrive/d/Workspace/Src/A9G/gprs_c_sdk/build/gw/gw/lib/libgw_debug.a(gw_main.o): In functionparse_number': /cygdrive/d/Workspace/Src/A9G/gprs_c_sdk/gw/src/utils/cJSON/cJSON.c:316: undefined reference to strtod' value:0, p:ffffffff882416e2, addend:0, symbol:0 /cygdrive/d/Workspace/Src/A9G/gprs_c_sdk/gw/src/utils/cJSON/cJSON.c:316: relocation truncated to fit: R_MIPS16_26 againststrtod' make[2]: [/cygdrive/d/Workspace/Src/A9G/gprs_c_sdk/build/gw//gw.elf] Error 1 make[1]: [/cygdrive/d/Workspace/Src/A9G/gprs_c_sdk/build/gw//gw.srec] Error 2

punee995 commented 6 years ago

you can try jsmn lib which is minimalistic JSON parser in C. and works on this SDK perfectly.

roamboy commented 6 years ago

it's only parser, hope support cJSON

Neutree commented 6 years ago

cJSON was add to the lib with source code now https://github.com/Ai-Thinker-Open/GPRS_C_SDK/blob/master/demo/json/src/demo_json.c#L98