# To subscribers of the xforms list from Mauricio Vieira <mvieira@araketu.dcc.ufba.br> :
I know this question is so stupid, but I'm desperate.
Form Designer made it to me, and when I compile there's no error by ld:
gcc -O2 -o /tmp/testepixmap.e testepixmap.c -lforms -lm -L/usr/X11R6/lib
-lX11 -lXpm
When I try to run, it core dumps. What am i doing wrong?
I saw the Xpm_faq, but it doesn't help me much cause it refers to
functions that forms encapsulate for me.
My code:
in testepixmap.c:
[...]
FD_FJogo *fdui = (FD_FJogo *) fl_calloc(1, sizeof(*fdui));
[...]
/* fdesign made: */
fdui->FJogo = fl_bgn_form(FL_NO_BOX, 420, 450);
obj = fl_add_box(FL_UP_BOX,0,0,420,450,"");
fdui->ImgTab = obj = fl_add_pixmap(FL_NORMAL_PIXMAP,10,40,400,400,"");
fl_set_object_boxtype(obj,FL_UP_BOX);
fl_set_pixmap_data(obj,tabuleiro_xpm);
and it core dumped. I've tried:
fdui->ImgTab = obj = fl_add_pixmap(FL_NORMAL_PIXMAP,10,40,400,400,"");
fl_set_pixmap_file(obj,"tabuleiro.xpm");
fl_set_object_boxtype(obj,FL_UP_BOX);
and core dumped again.
in testepixmap.h:
/**** Forms and Objects ****/
typedef struct {
FL_FORM *FJogo;
void *vdata;
char *cdata;
long ldata;
FL_OBJECT *ImgTab;
} FD_FJogo;
extern FD_FJogo * create_form_FJogo(void);
#endif /* FD_FJogo_h_ */
Xpm library is ok:
/usr/X11R6/lib/libXpm.so.4.11
/usr/X11R6/lib/libXpm.so.4
/usr/X11R6/lib/libXpm.a
/usr/X11R6/lib/libXpm.so
/usr/i486-linux-libc5/lib/libXpm.so.4.9
/usr/i486-linux-libc5/lib/libXpm.so.4
and I don't know what to do.
My tabuleiro.xpm is attached (gziped).
Regards, thanks and sorries.
+
Mauricio Vieira
:: Administrador dos Recursos Computacionais do IM ::
:: Estudante de Ciencia da Computacao - UFBA ::
:: mvieira@araketu.dcc.ufba.br ::
:: ::
+
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Sat Feb 17 2001 - 10:10:35 EST