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

Build For Raspberry pi , Rapbery with new Compiler C++17 #1671

Closed
bnadem opened this issue Jul 13, 2019 · 5 comments
Closed

Build For Raspberry pi , Rapbery with new Compiler C++17 #1671

bnadem opened this issue Jul 13, 2019 · 5 comments
Labels
kind: question solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@bnadem
Copy link

bnadem commented Jul 13, 2019

i want to compiler json.hpp for raspbery pi with c++ 17 , when i try from Make file i becothe folowing code error: ?

include file cassert is already included?

/json.hpp:7914:17: error: ‘assert’ was not declared in this scope
assert(x.f != 0);

warning: there are no arguments to ‘assert’ that depend on a template parameter, so a declaration of ‘assert’ must be available [-fpermissive]
assert(utf8_bytes_filled > 0);
the System ist raspbery pi with new compiler gcc-9.1.0

the version ist the new
is any Idea Please? Thanks

@nlohmann
Copy link
Owner

In order to asses your issue, we need the following information:

  • What is the issue you have?

  • Please describe the steps to reproduce the issue. Can you provide a small but working code example?

  • What is the expected behavior?

  • And what is the actual behavior instead?

  • Which compiler and operating system are you using? Is it a supported compiler?

  • Did you use a released version of the library or the version from the develop branch?

  • If you experience a compilation error: can you compile and run the unit tests?

@nlohmann nlohmann added the state: needs more info the author of the issue needs to provide more details label Jul 15, 2019
@bnadem
Copy link
Author

bnadem commented Jul 15, 2019

Thnak for Replay
What is the issue you have?
can't my project with your single Header file json.hpp
What is the expected behavior?
i try just only compiling, i have tried in Linux , this work fine with new compiler, old Compiler, but in Raspberry Pi, i can't, i becomme alway error "assert is not defined", in Your Header is already included

And what is the actual behavior instead?

cassert is already defined in your header,
Which compiler and operating system are you using? Is it a supported compiler?
Compiler is C++9.1 with Flag -std=c++17

Did you use a released version of the library or the version from the develop branch?

No i have stabile version, cloned and installed in Rapbery Pi, but i can't compiler with my Project
If you experience a compilation error: can you compile and run the unit tests?

i disable flag fpermissive, i become this Error warning: there are no arguments to ‘assert’ that depend on a template parameter, so a declaration of ‘assert’ must be available [-fpermissive]

@nlohmann
Copy link
Owner

You can try to define NDEBUG while compiling to switch off assertions, see https://en.cppreference.com/w/cpp/error/assert for more information.

@bnadem
Copy link
Author

bnadem commented Jul 16, 2019

thank you is working, but i want to know why he does working without flag,
you can close this issue, Thank you

@nlohmann
Copy link
Owner

I also have no idea. I guess the compiler has a buggy library. You may also want to try to change the include <cassert> by <assert.h>.

@nlohmann nlohmann added solution: proposed fix a fix for the issue has been proposed and waits for confirmation and removed state: needs more info the author of the issue needs to provide more details labels Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: question solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants