´ÙÀ½ ÀÌÀü Â÷·Ê

9. ù¹ø° ¿¹: Xscrabble

Matt ChapmanÀÇ XscrabbleÀ̶ó´Â ÇÁ·Î±×·¥ÀÌ ÀÖÀ¸¸é Àç¹ÌÀÖ°Ú´Ù°í »ý°¢Çß´Ù. ³ª´Â ÀÚÁÖ ScrabbleTM¸¦ µè±â ¶§¹®ÀÌ´Ù. ³ª´Â ÀÌ ÇÁ·Î±×·¥À» ´Ù¿î¹Þ¾Æ¼­ ¾ÐÃàÀ» Ç®°í, README ÆÄÀÏ¿¡ ÀÖ´Â ¾Æ·¡ÀÇ ¼ø¼­´ë·Î ÄÄÆÄÀÏÇß´Ù.

     xmkmf
     make Makefiles
     make includes
     make

¹°·Ð ÀÌ·¸°Ô Çؼ­ Á¦´ë·Î µÈ °Ç ¾Æ´ÏÁö¸¸...

gcc -o xscrab -O2 -O -L/usr/X11R6/lib 
init.o xinit.o misc.o moves.o cmove.o main.o xutils.o mess.o popup.o
widgets.o display.o user.o CircPerc.o
-lXaw -lXmu -lXExExt -lXext -lX11 -lXt -lSM -lICE -lXExExt -lXext -lX11
-lXpm -L../Xc -lXc

BarGraf.o(.text+0xe7): undefined reference to `XtAddConverter'
BarGraf.o(.text+0x29a): undefined reference to `XSetClipMask'
BarGraf.o(.text+0x2ff): undefined reference to `XSetClipRectangles'
BarGraf.o(.text+0x375): undefined reference to `XDrawString'
BarGraf.o(.text+0x3e7): undefined reference to `XDrawLine'
etc.
etc.
etc...

³ª´Â ÀÌ¿¡ ´ëÇØ comp.os.linux.x ´º½º±×·ì¿¡ ¹°¾îº¸¾Ò°í, ¾î¶² »ç¶÷ÀÌ Xt, Xaw, Xmu, X11 ¶óÀ̺귯¸®°¡ ¸µÅ© ´Ü°è¿¡¼­ ¹ß°ßµÇÁö ¾Ê¾ÒÀ½ÀÌ Æ²¸²¾ø´Ù°í Ä£ÀýÇÏ°Ô °¡¸£ÃÄ ÁÖ¾ú´Ù. Èì...

ÆÐÅ°Áö¿¡´Â µÎ °³ÀÇ ÁÖµÈ MakefileÀÌ ÀÖ¾ú°í, ±× Áß src µð·ºÅ͸®¿¡ ÀÖ´Â °ÍÀÌ ³» ÁÖÀǸ¦ ²ø¾ú´Ù. Makefile ³»ÀÇ ÇÑ ÁÙÀÌ LOCAL_LIBSÀ» ´ÙÀ½°ú °°ÀÌ Á¤ÀÇÇÏ°í ÀÖ¾ú´Ù. LOCAL_LIBS = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) ¸µÅ©°¡ ãÁö ¸øÇÑ ¶óÀ̺귯¸®µé·ÎÀÇ ÂüÁ¶°¡ ¿©±â ÀÖ¾ú´Ù.

LOCAL_LIBS ·ÎÀÇ ´ÙÀ½¹ø ÂüÁ¶¸¦ ã´Ù°¡, ³ª´Â ±× MakefileÀÇ 495 Çà¿¡¼­ ´ÙÀ½À» ¹ß°ßÇß´Ù.

      $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBS) $(LDLIBS)
$(EXTRA_LOAD_FLAGS)

ÀÌÁ¦ ÀÌ LDLIBS´Â ¹«¾ùÀ̾úÀ»±î?

      LDLIBS = $(LDPOSTLIB) $(THREADS_LIBS) $(SYS_LIBRARIES)
$(EXTRA_LIBRARIES)

SYS_LIBRARIES Àº ´ÙÀ½°ú °°¾Ò´Ù.

 SYS_LIBRARIES = -lXpm -L../Xc -lXc
±×·¸´Ù! ¿©±â ãÀ» ¼ö ¾ø´ø ¶óÀ̺귯¸®µéÀÌ ÀÖ¾ú´Ù.

¸µÄ¿°¡ LOCAL_LIBS Àü¿¡ LDLIBS¸¦ º¸¾Æ¾ß ÇÏ´Â °ÍÀÏ °¡´É¼ºÀÌ ÀÖ¾ú´Ù. µû¶ó¼­ óÀ½À¸·Î ½ÃµµÇØ º¼ ÀÏÀº 495 ÇàÀÇ $(LOCAL_LIBS)¿Í $(LDLIBS)¸¦ ¹Ù²ã¼­ ¾Æ·¡¿Í °°ÀÌ ÇÏ´Â °ÍÀ̾ú´Ù.

        $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LDLIBS) $(LOCAL_LIBS)
$(EXTRA_LOAD_FLAGS)                          ^^^^^^^^^^^^^^^^^^^^^^^

³ª´Â À§¿Í °°ÀÌ ¹Ù²ã¼­ ´Ù½Ã make¸¦ ½ÇÇàÇغ¸¾Ò°í, À̹ø¿¡´Â Á¦´ë·Î ½ÇÇàµÇ¾ú´Ù. ¹°·Ð XscrabbleÀº ¾ÆÁ÷ µð·ºÅ͸®ÀÇ À̸§À» ¹Ù²Û´Ù°Å³ª ¼Ò½º ÆÄÀÏ ÁßÀÇ Çϳª¿¡ ÀÖ´Â ¸î¸î ¼±¾ð¹®À» ÁÖ¼® ó¸®ÇÏ´Â µî, ¼¼ºÎÀûÀÎ Á¶Á¤°ú º¯°æÀÌ ÇÊ¿äÇßÁö¸¸, ÀÌ ÆÐÅ°Áö´Â ±× µÚ ¿À·§µ¿¾È ³ª¸¦ Áñ°Ì°Ô ÇØÁÖ¾ú´Ù.

[»õ ¹öÁ¯ÀÇ XscrabbleÀº ÀÌÁ¦ rpm Çü½ÄÀ¸·Î ±¸ÇÒ ¼ö ÀÖÀ¸¸ç, ¹®Á¦¾øÀÌ ¼³Ä¡µÈ´Ù.]

Xscrabble¸¦ ¾òÀ¸·Á¸é Matt Chapman¿¡°Ô e-mailÀ» Çϰųª, ±×ÀÇ È¨ ÆäÀÌÁö¿¡¼­ ´Ù¿î¹ÞÀ» ¼ö ÀÖ´Ù.

       ScrabbleÀº Milton Bradley Co., Inc.ÀÇ µî·ÏµÈ »óÇ¥ÀÌ´Ù.


´ÙÀ½ ÀÌÀü Â÷·Ê