开发者

pinvoke to clutter function

开发者 https://www.devze.com 2023-01-03 04:24 出处:网络
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);

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消