Reputation: 17
I'm trying to write code for little GUI in C. my code is :
#include <stdgui.h>
CALLBACK(draw_hello, evt, param)
{
int ascent, descent;
FONT fnt;
fnt = get_appfont();
get_font_info(fnt, &ascent, &descent, NULL);
plot_str(evt->graphic, 5, 5+ascent+descent, "Hello World", fnt);
return 0;
}
int main(int args, char *arg[])
{
int rv;
start_gui("Hello", args, arg, 0,
DEF_CB, "draw_hello", draw_hello, DONE);
create_window("Hello", 0, 0, 200, 100, 0,
SET_PROP, "ON_REDRAW", 1, "draw_hello", DONE);
run_event_loop(&rv);
return rv;
}
but its showing error : gui.c:1:20: fatal error: stdgui.h: No such file or directory... what to do..?
Also i tried GTK first but its very difficult to install. I'm tired of doing that and needed very small gui so shifted to the stdgui. Any help in that issue will be appreciated.
Upvotes: 0
Views: 178
Reputation: 7824
There is no header file called stdgui.h and there is no standard GUI. You will need to find a framework which will allow you to make GUIs. I used tk/tcl a long time ago but there are other previous answers see (Introduction to GUI programming with c). We are not really supposed to recommend frameworks to use.
Upvotes: 1