How can I compile X11 statically?
I'm compiling parallel C code on a cluster (HECToR).
Although I won't be running any parallel jobs interactively, my code contains some references to X11 functions which are used when it's run sequentially. The cluster I'm using doesn't support shared libraries, which rules out X11, at least in the way I've been using it so far.
开发者_运维知识库Could you advise me on whether there's anything I can do to compile X11 statically?
Thanks in advance for your help.
Ross
There's nothing magic about X11 here - if you don't have libX11.a
and other static libraries on your system, you'll need to either find packages for your OS that provide
those, or build whichever set of X11 libraries you need from source with the --enable-static
flag passed to the configure script.
If you do have libX11.a
, then see your compiler's documentation for it's flag to link with static libraries.
(Really though, anything in 2010 that doesn't support shared libraries is just plain wrong. They should enter the 1980's already.)
精彩评论