As the C++ learning track was just released, I thought I’d give it a go for JurassicJuly. I’ve downloaded the lasagna exercise to my machine, have created the build directory as per the instructions, running cmake -G Xcode .. from the build directory returns the below error
-- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:8 (project): No CMAKE_CXX_COMPILER could be found.
This SO post also has some good comments and explanations of what might be going on with a Mac not finding a compiler and linker. TL;DR: if you don’t install the command line tools, you don’t get LLVM and other goodies.
Thank you @BethanyG, after following the step 1 instructions to install Xcode and setup a C++ project in the link you sent, I have successfully created the the inital build with no errors!
@vaeng perhaps you want to include instructions on setting up the prerequisites? If you’d like, I can submit a PR for this.
Cmake - brew install cmake
Xcode - install Xcode from the app store, initialize a MacOS C++ project
Upon further inspection, I probably should have just read the installation instructions, I think installing GCC via brew would’ve cleared up the compiler issue I first created this post about.
That said, the CMake command wouldn’t work until I installed and configured a project in Xcode. It threw an error along the lines of Xcode 1.5 not supported. Prior to this, I hadn’t installed Xcode as the development I do is in VSCode and Eclipse. The installation instructions seem to infer that as long as you have a major IDE installed, you should be fine "so you should only need to install the IDE.".
I can still make a PR to really try and clarify this point within the installation instructions and probably make a reference back to the installation prerequisites from the testing instructions.
I think PR-ing to clarify would be great. It is super-annoying to be in the middle of things, only to realize that you have to stop and download or update Xcode/Xcode tools and configure a project there before you can even run CMake.
…even when you aren’t going to use Xcode as a dev environment!
I love my Apple 'puter, but