So far as I can tell, this option tells cobc to translate CALL statements to
static calls instead of dynamic calls.
However I only discovered that by trial and error. A program that wasn't
working without -static is now working with it. I also examined the generated
C code to verify that it's different. I don't know what other effects -static
may have.
However, -static is not listed among the compile options in the FAQ, nor in the
corresponding page in Gary Cutler's book (I'm looking at the FAQ for GnuCOBOL
v1.1 and the Cutler book for v2.0). My only clue that -static was even
available was that I saw it used in a couple of examples on the FAQ page. I
took a wild guess at what it did, and it looks like I guessed right.
I'm glad I found out about -static because the default of dynamic linking could
have been a deal-breaker. Without -static I couldn't find a way to link to a
static library (a *.a file on a UNIX or Linux system). Migrating to GnuCOBOL
would be even more disruptive if we had to use dynamic linking everywhere. It
might not even be possible; for all I know we may rely on a third party static
library somewhere that isn't available as a shared library.
Questions:
Have I interpreted -static correctly?
Does -static have any other effects that I didn't notice?
Will -static be available in v2.0? (I'm currently doing my explorations using
v1.1.)
Could someone please please document -static in the FAQ and wherever else is
appropriate?
Scott McKellar
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list