我正在尝试使用Dlang运行OpenGL示例。
void onError(int code, const(char)* text) nothrow
{
}
用法:
glfwSetErrorCallback(&onError);
绑定代码:
__gshared {
da_glfwSetErrorCallback glfwSetErrorCallback;
...
extern( C ) @ nogc nothrow {
alias da_glfwSetErrorCallback = GLFWerrorfun function( GLFWerrorfun );
...
alias GLFWerrorfun = void function( int, const( char )* );
而且我得到以下编译器错误:
Error: function pointer glfwSetErrorCallback (extern (C) void function(int, const(char)*) nothrow) is not callable using argument types (void function(int code, const(char)* text) nothrow)
编译器:2.065.0
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句