[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] calling std c library calls from cobol and cob_in
From: |
Richard A. Painter |
Subject: |
Re: [open-cobol-list] calling std c library calls from cobol and cob_inspect_tallying() segmentation violation |
Date: |
Wed Jun 5 00:11:02 2002 |
i am using 0.9.5.91...
when i do "cobc --help" it reports that the -m means "build a dynamic-linking
module". from what you say this must be wrong.
1. this version does NOT produce a .so file! i'm certain 0.9.5 release did
produce .so by default and a .o when using -static. i did not run the test i
have run here on the released version.
2. what does the following really mean?
XMLINPUT.cob:221: warning: compiled as a module due to USING clause
XMLINPUT.cob:221: warning: use compiler option `-m' explicitly
it seems that the warning says the module compile mode was used BECAUSE it had a
USING, not because it had no main().
3. yes, i do have PROCEDURE DIVISION USING and when i cobc i get the following
results. when i use the -m the 2-line warning goes away. however, i never get
the .so for the dynamic:
(linux1 src/magnum 915) cobc -c XMLINPUT.cob
XMLINPUT.cob:221: warning: compiled as a module due to USING clause
XMLINPUT.cob:221: warning: use compiler option `-m' explicitly
(linux1 src/magnum 916) ls
CCCCOPY ML122PM Orig/ XMLINPUT.c hello*
CLICENSE NCB70INQ TESTXML* XMLINPUT.cob testmagcob
CMLTAD NCB70INQ.sav TESTXML.cob XMLINPUT.o typescript
COPYRGHT Old/ XMLINPUT bin/
(linux1 src/magnum 917) cobc -c -static XMLINPUT.cob
XMLINPUT.cob:221: warning: compiled as a module due to USING clause
XMLINPUT.cob:221: warning: use compiler option `-m' explicitly
(linux1 src/magnum 918) ls
CCCCOPY ML122PM Orig/ XMLINPUT.c hello*
CLICENSE NCB70INQ TESTXML* XMLINPUT.cob testmagcob
CMLTAD NCB70INQ.sav TESTXML.cob XMLINPUT.o typescript
COPYRGHT Old/ XMLINPUT bin/
(linux1 src/magnum 919) cobc -c -m XMLINPUT.cob
(linux1 src/magnum 920) ls
CCCCOPY ML122PM Orig/ XMLINPUT.c hello*
CLICENSE NCB70INQ TESTXML* XMLINPUT.cob testmagcob
CMLTAD NCB70INQ.sav TESTXML.cob XMLINPUT.o typescript
COPYRGHT Old/ XMLINPUT bin/
(linux1 src/magnum 922) cobc -c -dynamic XMLINPUT.cob
XMLINPUT.cob:221: warning: compiled as a module due to USING clause
XMLINPUT.cob:221: warning: use compiler option `-m' explicitly
(linux1 src/magnum 923) ls
CCCCOPY ML122PM Orig/ XMLINPUT.c hello*
CLICENSE NCB70INQ TESTXML* XMLINPUT.cob testmagcob
CMLTAD NCB70INQ.sav TESTXML.cob XMLINPUT.o typescript
COPYRGHT Old/ XMLINPUT bin/
(linux1 src/magnum 924) cobc -c -m -dynamic XMLINPUT.cob
(linux1 src/magnum 925) ls
CCCCOPY ML122PM Orig/ XMLINPUT.c hello*
CLICENSE NCB70INQ TESTXML* XMLINPUT.cob testmagcob
CMLTAD NCB70INQ.sav TESTXML.cob XMLINPUT.o typescript
COPYRGHT Old/ XMLINPUT bin/
rich
Keisuke Nishida wrote:
>
> At Tue, 04 Jun 2002 09:31:03 -0600,
> Richard A. Painter <address@hidden> wrote:
> >
> > 1. i want to use static linking however, when i try to use -static
> > cobc complains telling me i must use -m since i use CALL USING. is
> > this true that dynamic linking MUST be used if one uses CALL USING?
>
> No. The compiler shows the warning when you use
> PROCEDURE DIVISION USING, not CALL USING. All the `-m' option
> implies is that the program does not have main() function.
> It should be independent of the -static/-dynamic options.