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

snprintf() requires <stdio.h> #244

Closed
oleh-derevenko opened this issue Jun 7, 2020 · 1 comment
Closed

snprintf() requires <stdio.h> #244

oleh-derevenko opened this issue Jun 7, 2020 · 1 comment

Comments

@oleh-derevenko
Copy link
Contributor

oleh-derevenko commented Jun 7, 2020

While cross-compiling from Ubuntu Linux to QXN Neutrino 7.0.0, invocations of snprintf() in /include/jsoncons/detail/write_number.hpp require explicit inclusion of <stdio.h>.

In file included from /home/oder/Party/jsoncons/include/jsoncons/json_encoder.hpp:25:0,
from /home/oder/Party/jsoncons/include/jsoncons/pretty_print.hpp:19,
from /home/oder/Party/jsoncons/include/jsoncons/basic_json.hpp:29,
from /home/oder/Party/jsoncons/include/jsoncons/json.hpp:10,
from /home/oder/Party/jsoncons/tests/src/json_options_tests.cpp:4:
/home/oder/Party/jsoncons/include/jsoncons/detail/write_number.hpp: In function 'bool jsoncons::detail::dtoa_scientific(double, char, Result&)':
/home/oder/Party/jsoncons/include/jsoncons/detail/write_number.hpp:299:78: error: there are no arguments to 'snprintf' that depend on a template parameter, so a declaration of 'snprintf' must be available [-fpermissive]
int length = snprintf(buffer, sizeof(buffer), "%1.*e", precision, val);
^
... (and more like this) ...

@danielaparker
Copy link
Owner

include has been added in master.

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

No branches or pull requests

2 participants