Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 3 months ago.
Issue with compiling rapidjson for MbedOS
I am trying to use rapidjson lib in my ARM MbeOS project: https://github.com/Tencent/rapidjson
$mbed add https://github.com/miloyip/rapidjson
My dev environment is MacOS.
mbed version : 1.7.3
$ mbed config -L
[mbed] Global config:
GCC_ARM_PATH=/Users/miclub01/gcc-arm-none-eabi-7-2017-q4-major/bin
TOOLCHAIN=GCC_ARM
[mbed] Local config (/Users/miclub01/GIT/statistics):
TARGET=DISCO_F746NG
In main.cpp I added
- include "rapidjson/allocators.h"
- include "rapidjson/document.h"
- include "rapidjson/writer.h"
- include "rapidjson/stringbuffer.h"
$mbed compile
Compile [ 93.4%]: jsonx.cpp
[Error] stdint.h@38,2: #error "Use this header only with Microsoft Visual C++ compilers!"
[Error] inttypes.h@38,2: #error "Use this header only with Microsoft Visual C++ compilers!"
[Error] stdint.h@38,2: #error "Use this header only with Microsoft Visual C++ compilers!"
[Error] stdint.h@135,30: expected initializer before 'int64_t'
[Error] stdint.h@136,30: expected initializer before 'uint64_t'
Thanks! Michael
1 Answer
6 years, 3 months ago.
Hi Michael,
Thanks for posting your solution in the comments above!
- Jenny, team Mbed
Solution: make sure you have these lines in your .mbedignore file:
rapidjson/test/*
rapidjson/example/*
rapidjson/include/rapidjson/msinttypes/*
posted by Michael Lubinsky 10 Aug 2018Hello Michael,
If I am correct, you adding the solution to your question, right?
Thank you so much for that. Would you mind if I (or you really) posted that in the "answer" section so that it can be better found when another developer has the same issue?
Thank you, Earl, team Mbed
posted by Earl Manning 13 Aug 2018Hi Earl, yes, I answered on my own question. I do not know how to put it into "answer" section - I do not see such section. On the bottom on my screen I see the green box which says:
" Thanks for posting this question Note that you can not answer your own question! "
I am confused by this message - why I cannot answer on my own question?
posted by Michael Lubinsky 13 Aug 2018I agree. I will ask the web team about it. Thanks for the follow up.
posted by Earl Manning 14 Aug 2018