-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HelloWorld example implementation #199
Comments
If I remove libLLVM and only install LLVMSharp, the error disappear |
I fix with removing libLLVM 15.0.0 and only installing LLVMSharp. The program looks like using libLLVM 5.0.0, It is not normal, so I reopen it. I guess the problem is related to the creation of a const global string. |
I downgrade until libLLVM 14.0.0 and its work By check out LLVM 15.0.0 ReleaseNotes Find that LLVM 15.0.0 has some changes of C API, but I don't see anything affecting this, |
LLVM 15 made some changes in how I plan on trying to improve this experience more in the future, but it will require a custom C extension library |
I am an LLVM beginner and trying to transform LLVM C++ API to LLVMSharp in my project (suffering from C++ and CMake)
So I am implementing a HelloWorld example with LLVMSharp for learning, but there are some things wrong
I create a console program with .NET 7 by Visual Studio 2022 Preview
I install LLVMSharp and libLLVM by NuGet, and add
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifier>
into csproj to solveDllNotFoundException
(#157 (comment))With abstruct some utilities function like
CreateExtern
,DeclarePuts
,CreateFunction
,CreateMain
...I create the following program:
Program crashes in
LLVM.BuildCall(builder_main, funcPuts, parameters, "");
, and the console output:By
LLVM.DumpModule(module);
, the halfway result before the crash is as follows:The text was updated successfully, but these errors were encountered: