You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to develop a simple CppSharp project. The implementation of the Setup function in the ILibrary interface is as follows:
public void Setup(Driver driver)
{
//throw new NotImplementedException();
var options = driver.Options;
options.GeneratorKind = GeneratorKind.CSharp;
options.OutputDir = @"D:\Project\Cppsharp\Sample\output";
var module = options.AddModule("CppClass");
module.IncludeDirs.Add(@"D:\Project\Cppsharp\Sample\include");
module.Headers.Add("Sample.h");
}
Upon execution of ConsoleDriver.Run(new CppClass()), two files named CppClass.cs and CppClass-symbols.cpp are generated within the designated folder. The files CppClass.cs and CppClass-symbols.cpp are copied into the C# project, and a Sample object is instantiated using CppClass.Sample sample = new CppClass.Sample(1,2).
However, upon running the C# project, an error message of "Unable to load DLL 'CppClass' or one of its dependencies" arises. Could you kindly advise on what steps I may be omitting?
OS: Windows
Used headers
class Sample
{
public:
int a;
int b;
Sample(int a, int b){
this->a=a;
this->b=b;
};
};
Used settings
Target: MSVC/GCC/Clang
Other settings
Stack trace or incompilable generated code
The text was updated successfully, but these errors were encountered:
Brief Description
I am attempting to develop a simple CppSharp project. The implementation of the Setup function in the ILibrary interface is as follows:
Upon execution of
ConsoleDriver.Run(new CppClass())
, two files named CppClass.cs and CppClass-symbols.cpp are generated within the designated folder. The files CppClass.cs and CppClass-symbols.cpp are copied into the C# project, and a Sample object is instantiated usingCppClass.Sample sample = new CppClass.Sample(1,2)
.However, upon running the C# project, an error message of "Unable to load DLL 'CppClass' or one of its dependencies" arises. Could you kindly advise on what steps I may be omitting?
OS: Windows
Used headers
Used settings
Target: MSVC/GCC/Clang
Other settings
Stack trace or incompilable generated code
The text was updated successfully, but these errors were encountered: