You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running Eclipse Oxygen on Linux and I followed all the instructions for Integration into my C++ project. When I try to call any function like j.size() or j.parse() on my json j; object, Eclipse keeps saying "Method 'function_name' could not be resolved" and it shows an error. Creating a json object and accessing its contents works perfectly fine, it's just size(). However it doesn't seem building with g++ causes any errors to occur. Are there any known issues with Eclipse and json.hpp? I'm using json v2.1.1.
I've followed the instructions on integration and I've added the argument for C++11, but it still does it. It's not a major issue, just wondering if it was possible to fix. I can close the issue if you are not aware of any fixes.
I cannot reproduce the issue. I downloaded Eclipse (Oxygen Release (4.7.0)), created a C++ hello world project and added file json.hpp. I also set the language dialect to C++11.
Okay I tried doing what you did with a new project on Ubuntu. It seems I get the same result as you - no errors.
However, I have a second project that contains some cflags and libs for OpenCV, but I wouldn't think that would affect it.
Also, the only major difference is that the project in the second image is version controlled under Git. Other than that, everything remains the same. Maybe it'll be better if I ask Eclipse support what's up.
Activity
nlohmann commentedon Jul 7, 2017
No, I have no heard about neither problems nor successes with the library and Eclipse. Maybe you need to set the language version to C++11?
And as a remark:
parseis a static function.k22jung commentedon Jul 7, 2017
I've followed the instructions on integration and I've added the argument for C++11, but it still does it. It's not a major issue, just wondering if it was possible to fix. I can close the issue if you are not aware of any fixes.
nlohmann commentedon Jul 7, 2017
This may be an issue in Eclipse's frontend, as you mentioned the code compiles without problems. I have little experience there.
nlohmann commentedon Jul 8, 2017
I cannot reproduce the issue. I downloaded Eclipse (Oxygen Release (4.7.0)), created a C++ hello world project and added file
json.hpp. I also set the language dialect to C++11.The
sizemethod is properly auto-completed:and also has no issues when written out:
I can compile without problems.
nlohmann commentedon Jul 8, 2017
Here the complete Window including build information.
k22jung commentedon Jul 10, 2017
Are you using Ubuntu 16.04? Or is that Mac?
nlohmann commentedon Jul 10, 2017
I'm using macOS Sierra.
k22jung commentedon Jul 11, 2017
Okay I tried doing what you did with a new project on Ubuntu. It seems I get the same result as you - no errors.
However, I have a second project that contains some cflags and libs for OpenCV, but I wouldn't think that would affect it.
Also, the only major difference is that the project in the second image is version controlled under Git. Other than that, everything remains the same. Maybe it'll be better if I ask Eclipse support what's up.
k22jung commentedon Jul 11, 2017
The
kl_trackerproject won't let me auto-complete any function related tojsonnlohmann commentedon Jul 11, 2017
This really sounds like an Eclipse issue.