@Kha I was having several errors of the form ``` 224: /Users/leonardodemoura/projects/lean4/build/release/stage0.5/bin/../include/lean/runtime/exception.h:23:13: error: exception specification of overriding function is more lax than base version 224: virtual ~throwable() noexcept; 224: ^ 224: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/exception:102:13: note: overridden virtual function is here 224: virtual ~exception() _NOEXCEPT; 224: ^ 224: In file included from myfuns.cpp:1: ``` As far as I can tell, the error ocurrs because my compiler uses an old C++ standard if the option `-std` is not used. I guess `-std=c++11` would also works, but I decided to use the same standard we used to compile Lean. |
||
|---|---|---|
| .. | ||
| main.lean | ||
| Makefile | ||
| myfuns.cpp | ||
| README.md | ||
Small project implemented using Lean and C++.
The C++ file myfuns.cpp wraps a C++ object using an lean_external_object.
The file myfuns.cpp exposes pure and effectful primitives.
The file main.lean contains a small Lean program that uses the exported primitives.
Build instructions
Assuming the Lean bin/ directory (e.g. from build/release/stage0.5) is in your PATH,
executing leanmake will create the executable build/bin/test.
The executable build/bin/test should produce the output
30
hello
foobla
world