[Haskell-cafe] Re: WX: linking to system libraries statically

Jason Dusek jason.dusek at gmail.com
Fri Apr 10 01:17:29 EDT 2009


2009/04/09 FFT <fft1976 at gmail.com>:
> I noticed that even simple WX demos like "Layout" are linked
> dynamically against 59 libraries on Linux. This would make
> distributing the binaries a nightmare. Is there a simple way
> to make a (mostly) statically linked binary?

  I have had mixed success with `-static -optl-static` (as
  recommended in "Practical Web Programming in Haskell" page,
  for example). On Macs, it's hard to get it to work (have never
  bothered); on Linux, I remember I had to remove it on once
  occasion to get things to work across Ubuntu and Gentoo (had
  to do with differences in libc, I believe, but I did not
  retain notes).

  Maybe passing in the specific libs to the linker with `-optl`
  is the best bet?

--
Jason Dusek


 |...Practical Web Programming in Haskell...|
  http://www.haskell.org/haskellwiki/Practical_web_programming_in_Haskell#Compiling_and_running_web_applications


More information about the Haskell-Cafe mailing list