Re: XForms: Color Problem with Xforms

Andre Philippi (philippi@earthlink.net)
Fri, 21 Aug 1998 15:46:14 -0700

# To subscribers of the xforms list from Andre Philippi <philippi@earthlink.net> :

Hi,

Sorry to bother again, but I look at the fl_set_defaults() function and the
discussion of the FL_IOPT structure in Appendix A; tryed to implement it, but
keep getting the error below...

Could anyone help me, please ?

Thank you in advance,

Andre Philippi.

-------------------------------------------------------------------------------
-

siberia:/home/philippi/appdev/lang/c/xforms> make
/opt/gnu/bin/gcc -O -I/home/philippi/packages/xforms/FORMS
-I/usr/openwin/include -c test.c
test.c: In function `main':
test.c:10: `FL_PBSharedMap' undeclared (first use this function)
test.c:10: (Each undeclared identifier is reported only once
test.c:10: for each function it appears in.)
*** Error code 1
make: Fatal error: Command failed for target `test.o'
siberia:/home/philippi/appdev/lang/c/xforms>

-------------------------------------------------------------------------------
-

#include "forms.h"

FL_FORM *form;
FL_OBJECT *yes, *no, *but;

main(int argc, char *argv[]) {

FL_IOPT fl_cntl;
fl_cntl.sharedColormap = 1;
fl_set_defaults(FL_PBSharedMap, &fl_cntl);

fl_initialize(&argc, argv, "FormDemo", 0, 0);

form = fl_bgn_form(FL_UP_BOX, 400, 400);
fl_add_box(FL_NO_BOX, 160, 40, 0, 0, "Do you want to Quit?");
yes = fl_add_button(FL_NORMAL_BUTTON, 40, 70, 80, 30,"Yes");
no = fl_add_button(FL_NORMAL_BUTTON, 200, 70, 80, 30,"No");
fl_end_form();

fl_show_form(form,FL_PLACE_MOUSE,FL_TRANSIENT,"Question");

while((but = fl_do_forms()) != yes)
;
fl_hide_form(form);

return 0;
}

-------------------------------------------------------------------------------
-

=================================================================
Andre Philippi - Applications Developer | Phone: 626-296-5016
philippi@corp.earthlink.net | Fax: 626-296-5113
Earthlink Network, Inc. | 3100 New York Drive
http://www.earthlink.net | Pasadena, CA 91107
=================================================================

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/