c*****n 发帖数: 43 | 1 I am learning how to program on X Window. Here are some simple scripts tha
could not run. Could you guys please help me?
theDisplay=XOpenDisplay(NULL);
if (theDisplay==NULL)
{.....}
When I compile this .c file by command cc, it is shown that
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (test.o) was d
etected. The linked output may not run on a PA 1.x system.
/usr/ccs/bin/ld: Unsatisfied symbols:
XOpenDisplay (code)
Does this infomation mean the compiler/linker is o | p*****m 发帖数: 31 | 2 maybe during linking, you havn't setting the libraries for X11.
the right format shoult be:
cc this.c -o this -lx11 -L/usr/X/lib/x11
use -l to specify the library name
-L to specify the path for library
在 coolman (snail) 的大作中提到: 】 |
|