LinuxFreeBSD

[알림판목록 I] [알림판목록 II] [글목록][이 전][다 음]
[ LinuxFreeBSD ] in KIDS
글 쓴 이(By): burp (spider)
날 짜 (Date): 1999년 5월  7일 금요일 오후 09시 44분 23초
제 목(Title): [Q]Motif 프로그램 컴파일하기


Motif 프로그램에는 다음과 같은 include문이 있읍니다. 그런데
리눅스에서는 path가 달라서 에러가 납니다. 컴파일시 옵션으로 조정
할수 있는 건가요? 딴에는 알아서 해봤는데 계속 undefined reference라는 
메시지가 나오는군요.

#include <Xm.h>
#include <Xm/PushB.h>
XtAppContext context;
XmStringCharSet char_set = XmSTRING_DEFAULT_CHARSET;

Widget toplevel, button;

void handle_button(Widget w, XtPointe client_data,XmPushButtonCallbackStruct 
*call_data)
    
/* handle the pushbutton's activate callback. */
{
  printf("button pushed\n");
}

void main(argc, argv)
{
  Arg al[10];
  int ac;

  /* create the toplevel shell */
  toplevel = XtAppInitialize(&context, "", NULL, 0, &argc, argv, 
     NULL, NULL, 0);

  /* create the button widget */
  ac = 0;
  XtSetArg(al[ac], XmNlabelString,
   XmStringCreate("Push Me", char_set)); ac++;
  button = XmCreatePushButton(toplevel, "button", al, ac);
  XtManageChild(button);
  XtAddCallback(button, XmNactiveCallback, handle_button, NULL);

  XtRealizeWidget(toplevel);
  XtAppMainLoop(context);
}
[알림판목록 I] [알림판목록 II] [글 목록][이 전][다 음]
키 즈 는 열 린 사 람 들 의 모 임 입 니 다.