CppSharp NuGet: Could not load file or assembly 'CppSharp.Generator
Opened this issue · 3 comments
angelotadres commented
Brief Description
Using CppSharp via NuGet (version 1.1.5.3168), the following error appears when running the Console Application: Could not load file or assembly 'CppSharp.Generator, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
OS: OS X Sonoma 14.5
Code Used
using CppSharp;
using CppSharp.AST;
using CppSharp.Generators;
namespace SkTools.BindingsGenerator;
internal class Program : ILibrary
{
public static void Main(string[] args)
{
ConsoleDriver.Run(new Program());
}
public void Setup(Driver driver)
{
var options = driver.Options;
options.GeneratorKind = GeneratorKind.CSharp;
var module = options.AddModule("Sk.Native");
module.IncludeDirs.Add("../../src/Sk.Native/include");
module.Headers.Add("greeter.h");
module.LibraryDirs.Add("../../src/Sk.Native/build");
module.Libraries.Add("Sk.Native.dylib");
}
public void SetupPasses(Driver driver) { }
public void Preprocess(Driver driver, ASTContext ctx) { }
public void Postprocess(Driver driver, ASTContext ctx) { }
}
Target: GCC
Stack trace or incompilable generated code
There is no Stack trace; Project compiles, this is the error verbatim when running:
/Users/atadres/Stuff/Workspace/sk/tools/SkTools.BindingsGenerator/bin/Debug/net8.0/SkTools.BindingsGenerator
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'CppSharp.Generator, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'CppSharp.Generator, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'
Process finished with exit code 134.
tritao commented
Is this on ARM64?
angelotadres commented
Yes. This was while using a Macbook M3.