도와주세요!!
글 수 15,339
2003.04.15 20:19:26 (*.119.8.31)
6680
답변해주셔서 정말 감사합니다..
19라인과 34라인을 표시하겠습니다.
19라인에는 전혀 에러가 없어보이는데 정말 남감합니다...
[root@lap nano]# make
Compiling test.c ...
arm-linux-gcc -c -I/usr/local/arm-linux/include -I/usr/local/arm-
linux/include/microwin -Wall-O2 -o test.o
test.c
test.c: In function `main':
test.c:19: parse error before `('
test.c:34: too few arguments to function `GrText'
make: *** [test.o] 오류 1
[root@lap nano]# vi test.c
[root@lap nano]# vi
에러메세지고요...
#include
#include
#define MARGIN 50
main()
{
GR_WINDOW_ID wid;
GR_GC_ID gc;
GR_EVENT event;
GR_SCREEN_INFO si;
if(GrOpen() < 0){
frintf(stderr,"Cannot open graphics
");
exit(1);
}
GrGetScreenInfo(&si);
19라인 --> wid = GrNewWindow(GR_ROOT_WINDOW_ID,MARGIN,MARGIN,si.cols -
MARGIN * 2,si.rows - MARGIN * 2,1,si.BLACK,si.WHITE);
GrSelectEvents(wid, GR_EVENT_MASK_BUTTON_DOWN |
GR_EVENT_MASK_EXPOSURE); GrMapWindow(wid);
GrMapWindow(wid);
gc = GrNewGC();
while (1) {
GrGetNextEvent(&event);
switch(event.type) {
case GR_EVENT_TYPE_BUTTON_DOWN:
if(event.button.wid != wid)
break;
GrClose();
exit(0);
case GR_EVENT_TYPE_EXPOSURE:
if(event.exposure.wid == wid)
34라인--> GrText(wid, gc, 50, 50, "EXIT", 4);
break;
}
}
}
19라인과 34라인을 표시하겠습니다.
19라인에는 전혀 에러가 없어보이는데 정말 남감합니다...
[root@lap nano]# make
Compiling test.c ...
arm-linux-gcc -c -I/usr/local/arm-linux/include -I/usr/local/arm-
linux/include/microwin -Wall-O2 -o test.o
test.c
test.c: In function `main':
test.c:19: parse error before `('
test.c:34: too few arguments to function `GrText'
make: *** [test.o] 오류 1
[root@lap nano]# vi test.c
[root@lap nano]# vi
에러메세지고요...
#include
#include
#define MARGIN 50
main()
{
GR_WINDOW_ID wid;
GR_GC_ID gc;
GR_EVENT event;
GR_SCREEN_INFO si;
if(GrOpen() < 0){
frintf(stderr,"Cannot open graphics
");
exit(1);
}
GrGetScreenInfo(&si);
19라인 --> wid = GrNewWindow(GR_ROOT_WINDOW_ID,MARGIN,MARGIN,si.cols -
MARGIN * 2,si.rows - MARGIN * 2,1,si.BLACK,si.WHITE);
GrSelectEvents(wid, GR_EVENT_MASK_BUTTON_DOWN |
GR_EVENT_MASK_EXPOSURE); GrMapWindow(wid);
GrMapWindow(wid);
gc = GrNewGC();
while (1) {
GrGetNextEvent(&event);
switch(event.type) {
case GR_EVENT_TYPE_BUTTON_DOWN:
if(event.button.wid != wid)
break;
GrClose();
exit(0);
case GR_EVENT_TYPE_EXPOSURE:
if(event.exposure.wid == wid)
34라인--> GrText(wid, gc, 50, 50, "EXIT", 4);
break;
}
}
}