-
-
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
Xcode - adding it to library #1300
Comments
That is really strange, because we can compile and run the unit tests with Xcode. Could you try to compile the unit tests? |
This looks like a too-early version of C++. What version of C++ are you compiling with? (Eg, can you copy-paste the command line that is being executed to compile this?) |
FWIW: The library is tested with Xcode 6.4-10.0, see https://github.com/nlohmann/json#supported-compilers. |
Apple LLVM version 9.0.0 (clang-900.0.39.2) I did update my mac 2 days ago with Xcode because it wouldn't update the build, also my lecturer has updated that because of the same reason. So what I've tried is:
Maybe it's not the version of the Xcode or the c++ version, I may be missing out a step since it did generate no errors for the first step. |
Maybe the c++ or the Xcode version.. I've tried heaps of other way but getting same error. Tried only building using json and it thought it wouldn't generate any errors but after making a main.cpp and #include <nlohmann/json.hpp> then using json=nlohman::json it generated same errors as before. |
Can you copy-paste the command line invocation used? The fact that you're getting a failure around "enable_if_t" suggests that you probably don't have C++14 turned on. Or just look in your Build Settings to see what the version of C++ you have enabled. |
I used Couldn't find anything to allow c++ 14 or similar to my build setting |
Could you please try the following just to make sure it's nothing fundamentally wrong:
This should finish without error (though take a while). |
Any news on this? |
Using XCode and Cmake for my project.
I am stuck on how to get json to be added to the library.
What I want to do is:
I have my codes inside work/src/ folder and have json files inside work/vendor.
Inside build I have done the cmake commands. (cmake -G Xcode ../work)
after it builds I run my code in XCode but the
#include <nlohmann/json.hpp> is not found and I get heaps of errors in the json file.
I think this occurs because I am not adding a 'Link Binary with Libraries' for XCode but it's weird how I don't have that in 'Build Phase'
Any help would be appreciated!
The text was updated successfully, but these errors were encountered: