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

Problem including ArduinoJson library #92

Open
kdsoo opened this issue Nov 30, 2016 · 1 comment
Open

Problem including ArduinoJson library #92

kdsoo opened this issue Nov 30, 2016 · 1 comment

Comments

@kdsoo
Copy link

kdsoo commented Nov 30, 2016

Hi,

I'm having problem building ble-nano code with ArduinoJson library which seems to be a conflict declaration of error_t.

Going through the ble_error.h file, I recognize that this error_t is very important so we cannot rename it but either ArduinoJson.
Can anyone give a workaround tip for this crisis?
The error I got is like follows:

In file included from /home/kdsoo/.arduino15/packages/RedBear/hardware/nRF51822/1.0.7/cores/RBL_nRF51822/ble-nrf51822-master/source/common/common.h:68:0,
from /home/kdsoo/.arduino15/packages/RedBear/hardware/nRF51822/1.0.7/cores/RBL_nRF51822/ble-nrf51822-master/source/btle/btle.h:24,
from /home/kdsoo/.arduino15/packages/RedBear/hardware/nRF51822/1.0.7/cores/RBL_nRF51822/ble-nrf51822-master/source/nRF5xn.h:29,
from /home/kdsoo/.arduino15/packages/RedBear/hardware/nRF51822/1.0.7/cores/RBL_nRF51822/nRF51822_API.h:10,
from /home/kdsoo/.arduino15/packages/RedBear/hardware/nRF51822/1.0.7/cores/RBL_nRF51822/BLE_API.h:33,
from /home/kdsoo/GIT/VSN/Arduino/LiFiNode/secondtier/secondtier.ino:3:
/home/kdsoo/.arduino15/packages/RedBear/hardware/nRF51822/1.0.7/cores/RBL_nRF51822/ble-nrf51822-master/source/common/ble_error.h:143:2: error: conflicting declaration 'typedef enum error_t error_t'
}error_t;

^
In file included from /home/kdsoo/Arduino/libraries/ArduinoJson/include/ArduinoJson/JsonVariant.ipp:17:0,
from /home/kdsoo/Arduino/libraries/ArduinoJson/include/ArduinoJson.hpp:20,
from /home/kdsoo/Arduino/libraries/ArduinoJson/include/ArduinoJson.h:8,
from /home/kdsoo/Arduino/libraries/ArduinoJson/ArduinoJson.h:8,
from /home/kdsoo/GIT/VSN/Arduino/LiFiNode/secondtier/secondtier.ino:2:
/home/kdsoo/.arduino15/packages/RedBear/tools/arm-none-eabi-gcc/4.8.3-2014q1/arm-none-eabi/include/errno.h:5:13: error: 'error_t' has a previous declaration as 'typedef int error_t'
typedef int error_t;

@kdsoo
Copy link
Author

kdsoo commented Dec 1, 2016

Reviewing the code of conflicts, I found that the use of error_t is restricted to nrf51822-master code base. so I deliberately renamed error_t used in your repository.
I didn't apply namespace because I find that you are not employing the namespace rule within nrf51822-master.
Please review my pull request(#94) and let me know it has a go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant