On 10.05.2011 12:20, some868one wrote:

> I checked many of the test executables, none of them depend on the FLTK libs! 
> are the libs just for development?

Yes, and you will need them to develop (link) your own programs,
of course.

> if the answer is yes, of course I don't need the cygwin FLTK libs, I don't 
> plan to develop for X11 soon.

Hmm, that's two (or more) different points mixed in one (sentence).

I don't want to be nitpicking, but to explain it more precisely:
your Cygwin (or MinGW) development environment is what it is said:
only for /development/. Your goal (and that of many Windows dev's)
is to produce native Windows executables that don't depend on any
Cygwin (or MinGW) dlls, so that they can be distributed freely
and without the known dll hell.

There are some problems, however: with the default Cygwin (FLTK)
options you will get FLTK programs that depend on X11 (as you said),
but that can be changed. The more important point is that you will
likely also get programs that depend on cygwin1.dll, and this is
not only a serious problem for distribution, but also (and maybe
more important) a license problem (you need to buy a license).

The next problem results from recent changes in gcc/g++ 4.5.x and
newer. Their(!) default build mode is to link dynamic to libgcc
and libstdc++ (the dlls), so that you would need to distribute
these dlls with your executable. The reason for this lies in
improved exception handling, but if you can live without this,
then the "-static-*" options you used in the configure line are
there to avoid this.

Hence, with these options, you can distribute your executables
as single .exe files w/o any dependencies.

As Ian said, this is somewhat easier with MinGW, but since the
newest versions use gcc 4.5+ as well, the "-static-*" problem
exists for MinGW as well. However, you don't need to use a
"cross compiler", and you will see that building your own
programs with Cygwin's cross compiler is much more complicated
than with MinGW (if you try and compare...).

Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to