Skip to content

Problem when compiling with Visual Studio 2010 #882

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

Closed
AlessandroDUffizi opened this issue Jan 24, 2019 · 6 comments · Fixed by #883
Closed

Problem when compiling with Visual Studio 2010 #882

AlessandroDUffizi opened this issue Jan 24, 2019 · 6 comments · Fixed by #883
Assignees

Comments

@AlessandroDUffizi
Copy link

I have successfully compiled jsoncpp with Visual studio 2017 and Windows 7
Now I'm trying to do the same with Visual studio 2010 over my laptop with Windows 10.

I got Sintax Error in json_value.cpp each time in the code I found:

----> return {};
Errore 8 error C2059: errore di sintassi: '{' c:\users\alessandro\chaos_compile\jsoncpp-master\src\lib_json\json_value.cpp 1533 1 lib_json

Errore 9 error C2143: errore di sintassi: ';' mancante prima di '{' c:\users\alessandro\chaos_compile\jsoncpp-master\src\lib_json\json_value.cpp 1533 1 lib_json

Errore 10 error C2059: errore di sintassi: '{' c:\users\alessandro\chaos_compile\jsoncpp-master\src\lib_json\json_value.cpp 1546 1 lib_json

Errore 11 error C2143: errore di sintassi: ';' mancante prima di '{' c:\users\alessandro\chaos_compile\jsoncpp-master\src\lib_json\json_value.cpp 1546 1 lib_json

It seems like the compiler don't recognize {} as a constant empty json value.

I used the msvc2010 jsoncpp.sln already provided in the Master branch.
I did nothing except compiling.

@AlessandroDUffizi
Copy link
Author

Okay. I found an old issue. Master need c++11 and MSVC2010 doesn't have that feature. So i Downloaded 0.x.y and it compiled.

But why there's a msvc2010 solution in the master, if it not works on msvc2010 ?
Just for let people upgrade solution from that?
Thanks a lot. Sorry for bothering.

@cdunn2001
Copy link
Contributor

We very recently started to require C++11, so we need to delete any 2010 references and document.

@hjmjohnson , could you take care of that? Also, if you can figure out where 2010 stops working, maybe we could tag the commit before that as last-msvc2010.

hjmjohnson added a commit to hjmjohnson/jsoncpp that referenced this issue Jan 24, 2019
The msvc2010 and vs71 IDE's do not support sufficient
C++11 feature sets for jsoncpp.

Remove these build environments.

resolves: open-source-parsers#882
@hjmjohnson
Copy link
Contributor

I'd go a bit further. Both CMake and Meson are compatible with various visual studio environments. In my experience, those tools (meson or cmake) provide a generic abstraction layer that makes supporting various Visual studio (or xcode, or clion, or unix makefile, or ninja) IDE's more consistent and reusble across difference environments (i.e. OS versions, and IDE patch updates).

I'd recommend removing the visual studio 2017 solution files as well, and support only meson and cmake.

@AlessandroDUffizi
Copy link
Author

In fact, when I compiled with VS2017 i didn't used any solution or CMakeList. I just added sources and headers manually. And that worked perfectly.

Anyway thanks a lot for the fast reply and for your precious work. Should i close the issue or it is something that you have to do?

@hjmjohnson
Copy link
Contributor

Note: I think @leesangj is some type of robot spamming GitHub repos. I'd recommend that we try to blacklist this person.

@cdunn2001
Copy link
Contributor

@hjmjohnson , it is possible to block a user from the Organization, but I think that user must have already deleted their account. Let me know if some other user begins spamming.

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.

4 participants
@hjmjohnson @cdunn2001 @AlessandroDUffizi and others