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

'parse_flags' redefinition ; different storage class #48

Closed
mikelaltadi opened this issue Jul 16, 2020 · 2 comments · May be fixed by #54
Closed

'parse_flags' redefinition ; different storage class #48

mikelaltadi opened this issue Jul 16, 2020 · 2 comments · May be fixed by #54

Comments

@mikelaltadi
Copy link

Hello Im trying to compile with visual studio 2015 and this error appears:
'parse_flags' redefinition ; different storage class

This is located in sajson.h line 152 constexpr uint8_t globals_struct::parse_flags[256] = {

Any idea?

@chadaustin
Copy link
Owner

Hi @mikelaltadi. I'm not sure. Can you paste the entire error?

@ihameed ihameed closed this as completed in 55b448b Oct 4, 2020
@wojdyr
Copy link
Contributor

wojdyr commented Apr 7, 2021

After this change I get linking errors with GCC 9 and 10 (I haven't checked other versions). I'm testing it on Ubuntu 20.04.

wojdyr@tc:~/fresh/sajson/example$ g++-9 -g -I ../include main.cpp 
/usr/bin/ld: /tmp/ccdOLULc.o: in function `sajson::internal::is_plain_string_character(char)':
/home/wojdyr/fresh/sajson/example/../include/sajson.h:170: undefined reference to `sajson::internal::globals_struct<void>::parse_flags'
/usr/bin/ld: /tmp/ccdOLULc.o: in function `sajson::internal::is_whitespace(char)':
/home/wojdyr/fresh/sajson/example/../include/sajson.h:175: undefined reference to `sajson::internal::globals_struct<void>::parse_flags'
collect2: error: ld returned 1 exit status

wojdyr added a commit to wojdyr/sajson that referenced this issue Apr 8, 2021
…gs."

This reverts commit 55b448b.
That change was for chadaustin#48, but it broke compilation with recent GCC.
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

Successfully merging a pull request may close this issue.

3 participants