-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
'nlohmann/json.hpp' file not found #2188
Comments
In order to asses your issue, we need the following information:
|
When trying to include the library with the following line: #include <iostream>
#include <fstream>
#include <cmath>
#include "nlohmann/json.hpp"
using json = nlohmann::json;
using namespace std;
int main() {
cout << "Hello World!";
return 0;
} I get this error after I compile it: I am running Visual Studio Code on a Mac I believe its being compiled using clang |
Where did you put the |
Inside of a folder labeled nlohmann and then that is inside of a folder labeled include. |
I am not familiar with Visual Studio Code. Maybe change the include to |
Yes I tried to change include to <nlohmann/json.hpp>, it didn't make a difference. |
What’s the include path? Which build system are you using? |
"includePath": [ using clang++ as the build system |
I'm sorry, I have no idea how to fix this error as it is not related to this library. Please seek help in a forum for VS Code. |
@Honorable22 Did you get any solution? |
No. I did not get an solution.
… On Sep 29, 2020, at 8:46 AM, shivam kumar singh ***@***.***> wrote:
@Honorable22 Did you get any solution?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Never mind, My code compiles now :) |
What was your solution?
… On Sep 29, 2020, at 8:58 AM, shivam kumar singh ***@***.***> wrote:
Never mind, My code compiles now :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
First I had to install the nlohmann_json package from apt |
Thank you for sharing.
… On Sep 29, 2020, at 10:53 AM, shivam kumar singh ***@***.***> wrote:
What was your solution?
First I had to install the nlohmann_json package from apt sudo apt install nlohmann-json-dev
then simply g++ file.cpp
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
if you experience the same issue. you can solve it by adding (nlohmann-json) the path to
|
@kevinmukuna didn't help :( |
I tried installing nlohmann json and some files found missing in /usr/include/nlohmann. I used sudo apt-get install nlohmann-json3-dev for installation and it was success. However some files are missing which I use in my code and hence the code is having compilation issues. I tried copying those files from other system. But it did not work :( My system details: @nlohmann : Could you please help on this? |
I am not maintaining this package. Please contact the maintainer. |
@nlohmann Thanks for the reply. Can I please know the details of the maintainer? |
I do not know. You should be able to look this up in your distro. |
When I do sudo apt install nlohmann-json-dev |
|
For some reason I am getting this error message on basic setup when running this library on VS Code:
UIDeveloperTest.cpp:26:10: fatal error: 'nlohmann/json.hpp' file not found
#include "nlohmann/json.hpp"
^~~~~~~~~~~~~~~~~~~
1 error generated.
I can not seem to find the solution to this error.
The text was updated successfully, but these errors were encountered: