Hi Max,

 

  This could be happening because IM uses a different libPNG than GTK, and
they seem to be conflicting. Weird that this never happen before. Maybe if
you try a different link order it would work. For instance:

 

g++ test.o -liup `pkg-config --libs gtk+-2.0` -lim -o test

 

Best,

Scuri

 

From: max chen [mailto:[email protected]] 
Sent: quinta-feira, 13 de fevereiro de 2014 23:27
To: [email protected]; [email protected]
Subject: Fwd: IUP Icon don't display after link with im library

 

Hi Dev Team.

 

Thanks for you hard work and good software library.

 

I have a problem with im and iup. test.c code is :

 ============== code =================

#include <iup/iup.h>

#include <im/im.h>

#include <im/im_image.h>

 

int main(int argc, char **argv)

{

    IupOpen(&argc, &argv);

    /* this function make icon display wrong */

    int size = imImageDataSize(10,10,IM_GRAY, IM_BYTE);

    IupMessage("TITLE", "TEST MESSAGE");

    IupClose();

    return 0;

}

============ code end ===================

 

compile like this:

gcc -c test.c

g++ test.o -liup -lim `pkg-config --libs gtk+-2.0` -o test

 

the icon of message dialog can't display, in the console I got these error:

(test:7257): GdkPixbuf-WARNING **: Bug! loader 'png' didn't set an error on
failure

 

(test:7257): Gtk-WARNING **: Error loading theme icon 'dialog-information'
for stock: 内部错误:图像载入模块“png”完成某操作失败,但没有给出任何原因

 

内嵌图片 1

 

but after comment the line 

    int size = imImageDataSize(10,10,IM_GRAY, IM_BYTE);

 

it display well.

 

the version of lib and tool and system :

iup 3.10.1

im 3.8.2

gcc/g++ 4.7.2

Linux 3.2.0-4-686-pae #1 SMP Debian 3.2.41-2 i686 GNU/Linux

 

Regards

Max

 

<<image001.png>>

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to