Compiling "static" applications with SWT/GTK

Jeff Sturm jsturm@one-point.com
Mon Dec 1 04:22:00 GMT 2003


On 2003年11月30日, Steve D. Perkins wrote:
> Anyone who claims that Linux is "more developer-friendly" than Win32
> is smoking crack! ;)

I'll take that comment seriously for a moment. My take on GCC is that it
levels the playing field somewhat, given that the mechanics of developing
software with GCC is largely the same wherever it is supported.
In your specific case, libgcj defaults to a shared build on GNU/Linux and
a static build on win32. That is inconvenient for you at the moment, but
it isn't so for everyone.
It sounds like you are trying to deploy a single executable. That's not
really a good justification for shared libraries. But it's also not the
common case. If you are deploying many, perhaps dozens, of gcj-compiled
executables you surely don't want each to be many megabytes in size.
That's what shared libraries prevent. (Of course there are other
advantages as well.)
GCC, including libgcj, defaults to a shared build on GNU/Linux hosts
because that's what most users and distributions want. It does not on
win32, in part because it does not yet work. That will eventually change,
and win32 users will likely have a libgcj.dll unless they configure with
--disable-shared.
There really, really should be a FAQ for this.
Jeff


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /