pinvoke 去杂波功能
我正在尝试调用一个杂乱函数。
该函数在文档中定义为
ClutterActor * clutter_texture_new_from_file (const gchar *filename, GError **error);
我的代码如下:
[DllImport ("libclutter-glx-1.0.so.0")]
private static extern IntPtr clutter_texture_new_from_file (string filename, IntPtr errorData);
我这样称呼它:
IntPtr texture = clutter_texture_new_from_file("myImage.jpeg",IntPtr.Zero);
但是,当在 ubuntu 上的 monodevelop 中这样调用时,我收到以下错误。
Unix Transport Error
最后,我想让错误报告正常工作,这样我就可以获得 gerror 结果,但首先我需要克服 Unix 传输错误。
I'm trying to pinvoke to a clutter function.
The function is defined in the docs as
ClutterActor * clutter_texture_new_from_file (const gchar *filename, GError **error);
The code I have is as follows:
[DllImport ("libclutter-glx-1.0.so.0")]
private static extern IntPtr clutter_texture_new_from_file (string filename, IntPtr errorData);
And I call it like this:
IntPtr texture = clutter_texture_new_from_file("myImage.jpeg",IntPtr.Zero);
however when called like this in monodevelop on ubuntu I get the following error.
Unix Transport Error
Eventally I would like to get the error reporting working so I can get the gerror result however firstly I need to get past the Unix Transport Error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
errorData 参数应标记为“ref IntPtr”,尽管我认为这不会导致此错误,因为应允许该参数为 NULL。否则,尝试在 Monodevelop 之外运行它。这种错误可能是由于程序中其他地方的段错误造成的。
The errorData parameter should be marked as "ref IntPtr", although I don't think that should be causing this error since that parameter should be allowed to be NULL. Otherwise, try running this outside Monodevelop. This kind of error may be the result of a segfault elsewhere in your program.