LINUX.ORG.RU

Сообщения Infinity

 

gtk2: рисование всякой всячины

не рисуется ничего, просто создается окно со скриншотом части экрана, которую он закрывает. делаю так: в функцию передается графический контекст окошка, создаю GdkPixmap.дальше:

GdkPixbuf *pixbuf = gdk_pixbuf_new_from_data((const guchar *)buf,//const guchar *data,
GDK_COLORSPACE_RGB, //GdkColorspace colorspace,

false, //gboolean has_alpha,

8, //int bits_per_sample,

cache.width(), //int width,

cache.height(), //int height,

depthy * cache.width(), //int rowstride,

NULL, //GdkPixbufDestroyNotify destroy_fn,

NULL //gpointer destroy_fn_data);

);
gdk_draw_pixbuf(pixmap,//GdkDrawable *drawable,
hdc, //GdkGC *gc,
pixbuf, //GdkPixbuf *pixbuf,
0, //gint src_x,
0, //gint src_y,
x, //gint dest_x,
y, //gint dest_y,
cache.width(), //gint width,
cache.height(), //gint height,
GDK_RGB_DITHER_NONE, //GdkRgbDither dither,
0, //gint x_dither,
0 //gint y_dither);
);

Infinity
()

кросс-компиляция, x86_64 -> i386

дано: AMD64, CentOS, компилятор g++, исходники динамической либы, которые прекрасно компиляются, но в 64-битную .so-шку. хочется, чтобы .so-шка была 32-битной. что было сделано: установлены 32-битные либы (gtk2, glibc), в параметрах компилятора прописана опция -m32, прописаны соответствующие пути к либам и заголовкам. что получилось: однако ж, либа не компиляется

вот кусочек того, что выдает компилятор. CODE /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../include/c++/4.1.1/cstring:88 : error: ‘::strcoll’ has not been declared /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../include/c++/4.1.1/cstring:90 : error: ‘::strxfrm’ has not been declared /usr/lib/syslinux/com32/include/stdlib.h: In function ‘void _Exit(int)’: /usr/lib/syslinux/com32/include/stdlib.h:16: error: expected unqualified-id before string constant /usr/lib/syslinux/com32/include/stdlib.h:17: error: ‘_exit’ was not declared in this scope /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../include/c++/4.1.1/cstdlib: At global scope: /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../include/c++/4.1.1/cstdlib:10 5: error: ‘::div_t’ has not been declared /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../include/c++/4.1.1/cstdlib:10 6: error: ‘::ldiv_t’ has not been declared

вот еще: CODE /usr/include/wchar.h:726: error: ‘__FILE’ has not been declared /usr/include/wchar.h:727: error: ‘__FILE’ has not been declared /usr/include/wchar.h:742: error: ‘__FILE’ has not been declared /usr/include/wchar.h:749: error: ‘__FILE’ has not been declared /usr/include/wchar.h:756: error: ‘__FILE’ has not been declared /usr/include/wchar.h:768: error: ‘__FILE’ was not declared in this scope /usr/include/wchar.h:768: error: ‘__stream’ was not declared in this scope

как это лечится? может еще надо что-то доставить?

Infinity
()

RSS подписка на новые темы