From: Alan W. I. <ir...@be...> - 2004-04-02 00:02:46
|
On 2004-04-01 12:34-0800 ooOoo wrote: > Is it possible to build statically-linked, stand-alone > executable files with plplot? Yes, although I don't much see the point since the executables end up much larger than when you use the shared libraries. However, assuming you have some exotic but justified reason to use static libraries, (:-)) here is the cookbook: Use 5.3.0 (since that is the only version we support). ./configure --disable-shared --disable-dyndrivers (+ other options such as --prefix) make make install --disable-dyndrivers is important since the (default) dyndrivers option does not work with static libraries. Normally, both shared and static libraries are built, but we turn off the shared ones (--disable-shared) to save you build time and also force the executable build to use the static version of the libraries. (Normally, the linker tries to use the shared version of the library whenever possible.) Build your executable just like the installed examples are built, e.g., gcc x01c.c -o x01c `plplot-config --cflags --libs` Try plplot-config --help to see other options for that command. Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the PLplot scientific plotting software package (plplot.org), the Yorick front-end to PLplot (yplot.sf.net), the Loads of Linux Links project (loll.sf.net), and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |