diff --git a/README.md b/README.md index 926bbd66..b9d58d17 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,8 @@ dotnet restore ``` ### Generate bindings Generate the binding code. Bindings are generated with [Bindgen.NET](https://github.com/BeanCheeseBurrito/Bindgen.NET). +> **Note** +> The binding generator needs access to system headers on MacOS. Ensure that XCode is installed. ```console dotnet run --project src/Flecs.NET.Bindgen ``` diff --git a/src/Flecs.NET.Bindgen/Program.cs b/src/Flecs.NET.Bindgen/Program.cs index cc0b1db4..f6995952 100644 --- a/src/Flecs.NET.Bindgen/Program.cs +++ b/src/Flecs.NET.Bindgen/Program.cs @@ -62,7 +62,7 @@ string GetMacOsHeaders() string path = process.StandardOutput.ReadToEnd().Trim(); - if (!Path.Exists(path)) + if (!Directory.Exists(path)) throw new DirectoryNotFoundException("Couldn't find system headers. Install XCode."); return path + "/usr/include";