How to create a static build

mandel mandel at wormhole.nn
Wed Nov 7 00:41:59 PST 2007


Steven Schveighoffer Wrote:

> 
> "mandel" wrote
> > Hi,
> >
> > I like to know how I can make a static build.
> > I can't get my program binaries to run on other linux
> > systems because some shared libs are missing.
> 
> You could use -static on the link line.  If you are using dmd, just copy the 
> link line it outputs to gcc and add the -static argument.
> 
> However, I don't recommend using this.  I have heard there are problems with 
> statically linking against glibc, and the maintainers say they aren't going 
> to fix it because nobody should be using static linking anymore...
> 
> -Steve 
> 
glibc..ok. But what about other libraries like zlib?
The issue is that I get error messages like
"./main: /usr/lib/libz.so.1: no version information available (required by ./main)"
the program get mostly killed after that.




More information about the Digitalmars-d mailing list