I have written some Xwindows files would like to know how to compile them
tried this command
gcc -o main main.o -lXt -lX11
gives errors like could not find Xt & X11
help please
I have written some Xwindows files would like to know how to compile them
tried this command
gcc -o main main.o -lXt -lX11
gives errors like could not find Xt & X11
help please
Compileis expecting where this libs are.
specify by -L option where Xt and X11 are.
It would be
gcc -o main main.o -lXt -lX11 -L$pathtoXt -L$pathtoX11
He He He Same Error buddy
Can we have all compilation commands you have for
targets main and main.o ?
here is the program
main.c
1 #include <X11/Intrinsic.h>
2 #include <Xm/Xm.h>
3 #include <Xm/Label.h>
4
5 XtAppContext context;
6 XmStringCharSet char_set = XmSTRING_DEFAULT_CHARSET;
7 Widget toplevel,label;
8
9 main(argc,argv)
10 int argc;
11 char* argv[];
12 {
13 Arg a1[10];
14 int ac = 0;
15 toplevel = XtAppInitialize(&context,"",NULL,0,&argc,argv,NULL,NULL,0);
16 label = XmCreateLabel(toplevel,"label",a1,ac);
17 XtmanageChild(label);
18 XtrealizeWidget(toplevel);
19 Xtmainloop();
20 }
after this:
cc -c main.c
cc -o main main.o -lXt -lX11 -L$pathtoXt -L$pathtoX11
Did u literally put as above ?
Could you find out where Xt and X11 exists. Please find out where those libs exists and then attach -L.
They may be having names libXt* and libX11*.