pinvoke 去杂波功能

发布于 2024-09-05 18:08:11 字数 609 浏览 1 评论 0原文

我正在尝试调用一个杂乱函数。

该函数在文档中定义为

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

全部不再 2024-09-12 18:08:11

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文