-
Notifications
You must be signed in to change notification settings - Fork 49
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
AOT - Ahead of Time | native code compiling #52
Comments
Would you be able to provide any more information about this? I am not familiar with the other library/tool you are using to do the AOT-compiling, how it works, etc, nor the context in which this error occurs. A full stack-trace, explanation of how/when it occurs, or even code example would be very helpful. |
Aot compiling transforms the c# code into native code(for higher performance and smaller file size), the feture is embedet in dot net and can be used like that in vs: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> </Project> documentation: i have a simple implementation that worked with iot from https://github.com/witcherofthorns/csharp-glfw-imgui/tree/master `
}
} |
I know what AOT-compiling is, I meant under what circumstances the error you are getting occurs. AOT-compiling bindings is unlikely to improve anything, as they are simply wrapping native functions that are doing the real work, which are already compiled to native machine code. Using unmanaged function pointers that implement the |
Is this failing under Linux, Windows, or both? When does it occur: i.e. when compiling, when the assembly is loaded, when initializing`, when creating a context, etc, etc? Reading the string pointer causing an error is rather odd unless something else is already way out of line where it can't even emit an error correctly. You indicated it gave a "platform error" when bypassing reading the string pointer. That used by the native GLFW library as a generic error for anything that isn't more specific, so it isn't a very helpful error code without the message, but it is being thrown by the native library. |
The error occured by running the compiled programm, the compiling didnt gave me any error. I only tried for windows |
I tryed it with this libary and it dosnt work
Unhandled Exception: GLFW.Exception: Win32: Failed to convert string from UTF-8: Falscher Parameter.
at GLFW.Glfw.GlfwError(ErrorCode code, IntPtr message) + 0x52
at SimpleGame!+0x120468
or
Unhandled Exception: UGLFW.Exception: PlatformError
at GLFW.Glfw.GlfwError(ErrorCode code, IntPtr message) + 0x64
at SimpleGame!+0x11fac8
after removing the the IntPtr to string method from source.
I tryed already a diferent libary/implementation of glfw in c# with aot and it work. it would be cool if that would be added here to
The text was updated successfully, but these errors were encountered: