Compiling Kaleidoscope with clang++

Dear all,

As I am trying to run Kaleidoscope code from https://llvm.org, I am receiving following error message.

Error : no template named ‘make_unique’ in namespace ‘std’ ; did you simply mean ‘make_unique’ ?

Please advise. Note that I have seen a solution with cmake in some website. As I am not very familiar with cmake, kindly elaborate the usage more in case your solution has cmake.

Thanks.
Sudakshina

Hi Sudakshina ,

It sounds like you are compiling in C++11 mode. LLVM has recently switched to C++14. make_unique is one of the features introduced in C++14.

Could you try making sure that you use C++14? Here's how you set it up in CMake

set(CMAKE_CXX_STANDARD 14 CACHE STRING "")

I hope that this helps,
Andrzej

Thank you all