
Thread
2014.10.07 22:40 "Re: [Tiff] build a static tiff2pdf", by Bob Friesenhahn
So I just ran the link command manually adding the static option:
gcc -g -O2 -Wall -W -static -o tiff2pdf tiff2pdf.o ../libtiff/.libs/libtiff.a ../port/.libs/libport.a -ljpeg -lm /usr/local/lib/libjpeg.a
It's not the cleanest way of building a static binary but at least it worked.
Be aware that pure static executables are not necessarily portable to other systems. The C shared library interface is much more dependable than the raw system call interface used between the C library and the kernel.
Statically linking libjpeg should not be a problem. Statically linking libc is not a wise idea.
Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/