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

json component contain a test.c file with main function #1883

Closed
niraizik opened this issue Apr 25, 2018 · 3 comments
Closed

json component contain a test.c file with main function #1883

niraizik opened this issue Apr 25, 2018 · 3 comments

Comments

@niraizik
Copy link

The json components contain a cJSON/test.c file that have the main function.
If I have a project with a main function (called in app_main) it may not get called
The json test main will be called instead (it depend on the location of the libs in the LD command)

I think I t is better to exclude test.c in json component.mk

@anujdeshpande
Copy link
Contributor

I understand why that can be frustrating, but cjson is a git submodule in the main esp-idf git repo. If we change the file, we will have to make changes to upstream or maintain our own fork(which is tedious).

It would've been possible to add a src/include directory instead of the whole cjson directory in component.mk but that would still involve making changes upstream.

Do you think you could send a PR to the upstream repo for a fix?

@niraizik
Copy link
Author

Hi @anujdeshpande,
As @negativekelvin add can't we just add
COMPONENT_OBJS := cJSON/cJSON.o cJSON/cJSON_Utils.o
to the json component.mk

@igrr igrr closed this as completed in 9356d6a May 2, 2018
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

3 participants