This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

compiling Motif (Lesstif) program


Hi,

I just try learning X and Motif.
I have a very simple program:

---snip---
#include <X11/Intrinsic.h>
#include <Xm/Xm.h>
#include <Xm/Label.h>

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

  toplevel=XtInitialize(argv[0],"",NULL,0,&argc,argv);
  ac=0;
 
XtSetArg(al[ac],XmNlabelString,XmStringCreate("hello",XmSTRING_DEFAULT_CHARSET)); 
  ac++;
  msg=XtCreateManagedWidget("msg",xmLabelWidgetClass,toplevel,al,ac);
  XtRealizeWidget(toplevel);
  XtMainLoop();
}
---snip---
and try to compile it using:
gcc -o simple simple.c -I /usr/X11R6/include/ -L /usr/X11R6/lib/ -lXm -lXt
-lX11

the result is this:
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x3536):Shell.c: undefined reference
to `_SmcCloseConnection'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x3617):Shell.c: undefined reference
to `_SmcModifyCallbacks'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x3626):Shell.c: undefined reference
to `_SmcClientID'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x3686):Shell.c: undefined reference
to `_SmcOpenConnection'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x37b6):Shell.c: undefined reference
to `_SmcGetIceConnection'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x37cd):Shell.c: undefined reference
to `_IceConnectionNumber'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x3d51):Shell.c: undefined reference
to `_SmcSetProperties'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x3de4):Shell.c: undefined reference
to `_SmcSetProperties'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x3e4d):Shell.c: undefined reference
to `_SmcDeleteProperties'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x3e7c):Shell.c: undefined reference
to `_SmcGetIceConnection'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x3e85):Shell.c: undefined reference
to `_IceProcessMessages'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x3f26):Shell.c: undefined reference
to `_SmcSaveYourselfDone'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x408a):Shell.c: undefined reference
to `_SmcInteractDone'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x41ab):Shell.c: undefined reference
to `_SmcSaveYourselfDone'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x43f1):Shell.c: undefined reference
to `_SmcInteractRequest'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x448e):Shell.c: undefined reference
to `_SmcInteractDone'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x44da):Shell.c: undefined reference
to `_SmcRequestSaveYourselfPhase2'
/usr/X11R6/lib//libXt.a(Shell.o)(.text+0x4501):Shell.c: undefined reference
to `_SmcSaveYourselfDone'
collect2: ld returned 1 exit status

I assume I must have forgotten something basic. It would be great, if you
could point me to a good source on the Internet or give me a hint.

When executing cygcheck -l I see that lesstif is installed.
gcc is 3.2-3

Cheers,
Klaus

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]