Comments (12)
I'd like to use cobcurses, but I'm getting similar errors when I try to compile it. My GnuCOBOL is
``$ cobc --version
cobc (GnuCOBOL) 3.0-rc1.0
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart
Built May 14 2018 12:16:55
Packaged Apr 22 2018 22:26:37 UTC
C version "4.8.5"
running on
$ uname -a
Linux 4.4.126-48-default #1 SMP Sat Apr 7 05:22:50 UTC 2018 (f24992c) x86_64 x86_64 x86_64 GNU/Linux
and I'm seeing messages like
cobc -b -Wall -Wno-call-params -std=cobol85 -I../copybk -free libcobcurses.cob cobcurses.o terminal.o term_curses.o term_curses_conv.o term_curses_menu.o cc_menu.o environ.o misc.o dynstr.o pathname.o fcomp2.o ecomp1.o ecomp2.o expon.o ecvt.o units.o eunits.o enumber.o cobmenu.o cobtrace.o -L/usr/local/lib64 -lncurses
libcobcurses.cob:20: error: syntax error, unexpected Identifier, expecting EXTERNAL or EXTERNAL-FORM or GLOBAL or IDENTIFIED
libcobcurses.cob:21: error: syntax error, unexpected Identifier
../copybk/COBCURSG.cbl:12: error: syntax error, unexpected Identifier, expecting EXTERNAL or EXTERNAL-FORM or GLOBAL or IDENTIFIED
../copybk/COBCURSG.cbl:14: error: syntax error, unexpected Identifier, expecting EXTERNAL or EXTERNAL-FORM or GLOBAL or IDENTIFIED
:
from cobcurses.
I probably should have said that after about fifty of these syntax error messages the compiler quits and the build fails:
../copybk/COBCURSG.cbl:182: error: syntax error, unexpected Identifier
../copybk/COBCURSG.cbl:184: error: syntax error, unexpected Identifier
../copybk/COBCURSG.cbl:190: error: syntax error, unexpected Identifier
cobc: too many errors
cobc: aborting compile of ../copybk/COBCURSG.cbl at line 190 (PROGRAM-ID: COBCURSES-OPEN)
Makefile:449: recipe for target 'libcobcurses.so' failed
make[2]: *** [libcobcurses.so] Error 97
make[2]: Leaving directory '/home/leslie/Downloads/Packages/Non-RPMs/Linux/cobcurses/src/lib'
Makefile:262: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/leslie/Downloads/Packages/Non-RPMs/Linux/cobcurses/src'
Makefile:183: recipe for target 'all' failed
make: *** [all] Error 2
from cobcurses.
@gpaterno There is no OpenCOBOL 2.x release version and the result of the (by standard) invalid MOVE
is adjustable with recent versions... I highly suggest in general to upgrade to GnuCOBOL 3.0 RC1 (meaning you have to recompile all COBOL sources [but the good news: just need to do this once as GC 2.2 modules can be used with later versions without recompiling])
You may consider to change
MOVE HIGH-VALUES TO NC-DIFF-Y, NC-DIFF-X.
to one of these:
MOVE 9999 TO NC-DIFF-Y, NC-DIFF-X. *> most portable
MOVE FUNCTION HIGHEST-ALGEBRAIC (NC-DIFF-Y) *> dynamic and according to COBOL2002
TO NC-DIFF-Y, NC-DIFF-X.
from cobcurses.
Um, GnuCobol 3.0 RC1 is in fact what I'm using.
I scanned the make files in the source directory and cobol85 does not appear in them anywhere, so maybe since Open COBOL 1.1 the default dialect has changed? I'll check with the GnuCOBOL folks and see if that's the case.
from cobcurses.
Aha! cobol85 is specified in the makefiles in the subdirectories. Is there a way to override that with configure?
Now that you've pointed out that COMP-5 is not a COBOL85 type, I'm thinking that -std=ibm or -std=mvs might work.
The only dialect that i have experience with is IBM's so this was a bit of a mystery to me.
from cobcurses.
Changing the makefiles to use -std=ibm didn't fix the issue.
from cobcurses.
from cobcurses.
Hmmm... obviously I don't know how to make this change. I modify the line
COBSTD=-std=cobol85
to
COBSTD=-std=ibm
or
COBSTD=-std=default
but when I make it still says it's using -std=cobol85; so somewhere something is resetting it for me.
from cobcurses.
@jlturriff this doesn't has anything to do with this issue, therefore the discussion about the Makefiles should be moved to #3
from cobcurses.
Thanks to GNU Cobol 3 RC and the instructions on #3 I progressed a bit.
But I'm still stuck here:
cobc -b -Wall -Wno-call-params -std=default -I../copybk -free libcobcurses.cob cobcurses.o terminal.o term_curses.o term_curses_conv.o term_curses_menu.o cc_menu.o environ.o misc.o dynstr.o pathname.o fcomp2.o ecomp1.o ecomp2.o expon.o ecvt.o units.o eunits.o enumber.o cobmenu.o cobtrace.o -L/usr/local/lib -lncurses
../copybk/COBCURSG.cbl:78: warning: ignoring SYNCHRONIZED for group item 'FILLER'
../copybk/COBCURSG.cbl:78: warning: ignoring SYNCHRONIZED for group item 'FILLER'
../copybk/COBCURSL.cbl:47: error: TO phrase without DEPENDING phrase
../copybk/COBCURSL.cbl:53: error: TO phrase without DEPENDING phrase
../copybk/COBCURSL.cbl:110: error: TO phrase without DEPENDING phrase
[....]
Any idea?
Thanks
from cobcurses.
Any idea?
@gpaterno Yes - check cobc --help
and/or its manual... I just did cobc --help | grep DEPEND
and found the following:
attach -fodo-without-to=ok
to your command.
from cobcurses.
from cobcurses.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cobcurses.