On Thu, Aug 18, 2011 at 10:49, Delian Xu <delia...@gmail.com> wrote: > Hi guys, > I'm trying to compile a static VIM so that I can launch it every where (On > machines with different Linux distributions and library versions). > I got it to link statically by passing in the LDFLAGS at configure > time like this (I add CFLAGS to avoid the -g flag): > > env CFLAGS="-O2" \ > LDFLAGS="-static" \ > ./configure \ > --prefix=/usr/local \ > --disable-nls \ > --without-x \ > --disable-gui \ > --disable-gpm \ > --with-features=big
This works for me. I get a statically-linked binary. Though linker complains a little about some functions: warning: Using '{dlopen, getpwnam, getpwuid, gethostbyname}' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking. > However, The binary produced is not static (linked *.so dynamically). How to > compile ti into a static one?? > Please help, much thanks! > --Delian -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php