Albrecht Schlosser wrote:

> I'm now using configure like this:
> 
> $ LDFLAGS="-static-libgcc -static-libstdc++" \
>    ./configure \
>    --prefix=... (more options)
> 
> The official documentation can be found here:
> 
>    http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
> 
> Especially the option -shared-libgcc (vs. -static-libgcc) is needed
> to be able to "throw and catch exceptions across different shared
> libraries". That is probably the reason why this is the default.

Ah yes - that sort of makes sense. I have had issues in the past on 
WinXX  systems with communication between libs and so forth, and loading 
(almost) everything from DLL's did help with that.

I didn't realize that it also affected the throwing/catching of 
exceptions though (I seldom use them in my code.)

> These options should be preferred over "-static", because -static
> would link everything else also statically. I wouldn't mind much,
> because I believe that in the Windows world there are only dll's
> anyway (no static libs, at least for the Windows runtime), but it
> is surely better to use these two options explicitly if you need
> them.

So, for my usage, if I use gcc-4.5.x the -static-libgcc (and probably 
also -static-libstdc++) options would more or less put me back to where 
I am when I use gcc-3.4.5 or similar, then, I guess?

> 
> Note that this does not only concern Windows, but gcc on all platforms.
> My gcc 4.4.3 on Ubuntu 10.10 doesn't know -static-libstdc++, though
> (-static-libgcc is okay). I can see a dependency on libstdc++.so.6
> in fluid, for instance. I don't know whether this can be a portability
> problem.


Interesting, I had not picked up on that at all, and am using ubuntu 
10.10 on some of my boxes now... Hmm, I need to check some stuff, I think...

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

Reply via email to