CnUnix

[알림판목록 I] [알림판목록 II] [글목록][이 전][다 음]
[ CnUnix ] in KIDS
글 쓴 이(By): Alpheus (전 형 조)
날 짜 (Date): 1995년03월29일(수) 04시50분19초 KST
제 목(Title): Re: motif프로그램짤때 에러..


그 책의 원래 소스 프로그램은 아래와 같지 않나요?

------------------------- 여기부터 -----------------------------

/***************************************************************
From the book "Motif Programming, The Essentials...and More"
by Marshall Brain.
Published by Digital Press, ISBN 1-55558-089-0.
To order the book, call 1-800-DIGITAL and ask for EY-J816E-DP.

Copyright 1992, by Digital Equipment Corp.

This code demonstrates the label widget.
***************************************************************/

/* label.c */

#include <Xm/Xm.h>
#include <Xm/Label.h>

XtAppContext context;
XmStringCharSet char_set=XmSTRING_DEFAULT_CHARSET;

Widget toplevel, label;

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


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

  /* create label widget */
  ac=0;
  XtSetArg(al[ac],XmNlabelString, 
    XmStringCreateLtoR("Hello World", char_set)); ac++;
  label=XmCreateLabel(toplevel,"label",al,ac);
  XtManageChild(label);

  XtRealizeWidget(toplevel);
  XtAppMainLoop(context);
}

--------------------- 여기까지 -------------------------
그 책 어딘가를 뒤져보면, 그 책에 나와 있는 모든 소스 프로그램을
구할 수 있는 ftp site가 적혀 있을 겁니다.

그리고, 혹시 삼보에서 나온 한글 모티프를 사용하신다면 
경우에 따라서 몇가지 옵션을 더 붙여야 할지도...
제 경우에는 /usr/local/trigem밑에 그 설명이 나와 있는데..
(그 책의 예제를 -lXm -lXt -lXJp -lXext -lXmu -lX11로 하면 
 삼보 모티프에서 아무 문제 없이 콤파일/실행 되더군요..)

그럼 이만..

[알림판목록 I] [알림판목록 II] [글 목록][이 전][다 음]
키 즈 는 열 린 사 람 들 의 모 임 입 니 다.