On 2003-12-28 00:23+0100 "Gerardo Roz=E1n Arredondo" wrote:
> Somebody knows how to compile a program with PLPLOT statically?
> I did this:
> gcc myprogram.c -o myprogram /usr/local/lib/libplplotd.a -I/usr/ ....
> it compiles, but when:
> segmentation fault.
> I'am making a program with the forms library using the device "mem" from
> plplot and I want to lint PLPLOT statically.
I normally don't build the static version of PLplot libraries so I haven't
tried this myself, but plplot_libtool --help --mode=3Dlink says to do the
plplot_libtool --mode=3Dlink gcc -all-static -g -O2 -mieee-fp x01c.c
-I/usr/local/plplot_at/include/plplot -L/usr/local/plplot_at/lib -lplplotd
I took this example from what normally works for the first _installed_ C
example in $prefix/lib/plplot$version/examples/c/Makefile. The only thing =
did extra was the -all-static option recommended by plplot_libtool --help
--mode=3Dlink. You will of course want to adjust the source programme name
and -L, -I, and -o options appropriate to your situation.
Alan W. Irwin
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