Build system - COBOL
-
- Posts: 2265
- Joined: 25.08.2021 18:15
Alexey
I've tried to amend the COBOL build.system (now renamed as GnuCOBOL) as follows:
When I do Runner -> Build with this I get the message 'No command "Build" in build-system GnuCOBOL...'. I am trying to compile BBCB.CBL. There s a message 'Opened BBCB.CBL' so it's finding the target but then states: 'No build system(s) found for lexer COBOL' and then 'No command "Build" in build-system GnuCOBOL...'
I must be close to the solution
I've tried to amend the COBOL build.system (now renamed as GnuCOBOL) as follows:
Code: Select all
{
"file_patterns": ["file_patterns": ["*.cob", "*.cbl", "*.cpy"],
"name": "Compile",
"cmd": [ "cobc -x -std=mf c:\workarea\gnucobol\beeb\", "$file_name"],
"working_dir": "$file_path",
"file_regex": "^([^:]+):([0-9]+):"
"variants": [
{
"name": "Run",
"cmd": ["$file_base_name"]
}
}
I must be close to the solution
Alexey
Ref your attempt to download GnuCOBOL the SourceForge web site only appears to have files of the source code. Windows pre-built binaries are at https://www.arnoldtrembley.com/GnuCOBOL.htm. The file you need is GC32-BDB-rc2-rename-7z-to-exe.7z . After downloading rename to file to *.exe (drop the .7z) and it will install in the appropriate folders .
The compiler (cobc.exe) will be in C:\GnuCOBOL\bin
Ref your attempt to download GnuCOBOL the SourceForge web site only appears to have files of the source code. Windows pre-built binaries are at https://www.arnoldtrembley.com/GnuCOBOL.htm. The file you need is GC32-BDB-rc2-rename-7z-to-exe.7z . After downloading rename to file to *.exe (drop the .7z) and it will install in the appropriate folders .
The compiler (cobc.exe) will be in C:\GnuCOBOL\bin
-
- Posts: 2265
- Joined: 25.08.2021 18:15
your json file has many errors. i fixed them. my final file
C:\CudaText\data\buildsystems\cobol.sublime-build
is
i created fake Cobol file C:\Work\new.cbl
and i run the command in the Cud's menu: "Plugins / Runner / Build" and it shows in the bottom panel of Cud:
C:\CudaText\data\buildsystems\cobol.sublime-build
is
Code: Select all
{
"file_patterns": ["*.cob", "*.cbl", "*.cpy"],
"name": "Compile",
"cmd": ["c:\\GnuCOBOL\\bin\\cobc.exe", "-x", "-std=mf", "c:\\work", "$file_name"],
"working_dir": "$file_path",
"file_regex": "^([^:]+):([0-9]+):",
"variants": [
{
"name": "Run",
"cmd": ["$file_base_name"]
}
]
}
Code: Select all
procedure aa;
input dd
yes , this is close to solution now.-- [10:05:46] Building: cobol: new.cbl
-- Command: ['c:\\GnuCOBOL\\bin\\cobc.exe', '-x', '-std=mf', 'c:\\work', 'new.cbl']
-- Working dir: C:\Work
configuration error:
/mingw/share/gnucobol/config\mf.conf: No such file or directory
/mingw/share/gnucobol/config\default.conf: No such file or directory
-- Done (0.2s), return code: 1
-
- Posts: 2265
- Joined: 25.08.2021 18:15
Alexey
Thanks - I'll try out your suggestions. Incidentally I forgot to mention that a number of GnuCOBOL folders need to be set if, as I often do, a standalone compile is run. I use this batch file:
Thanks - I'll try out your suggestions. Incidentally I forgot to mention that a number of GnuCOBOL folders need to be set if, as I often do, a standalone compile is run. I use this batch file:
Code: Select all
set Path=c:\gnucobol\bin
set COB_CONFIG_DIR=c:\gnucobol\config
set COB_COPY_DIR=c:\gnucobol\copy
set COB_INCLUDE_PATH=c:\gnucobol\include
set COB_LIB_PATH=c:\gnucobol\lib
cobc -x -std=mf %1
Alexey
I'm trying to compile BBCB.CBL which is in folder c:\workarea\gnucobol\beeb so I amended the 'cmd' line in the build to
I'm trying to compile BBCB.CBL which is in folder c:\workarea\gnucobol\beeb so I amended the 'cmd' line in the build to
Doing Plugins -> Runner -> Build gives the following messages:"cmd": ["c:\\GnuCOBOL\\bin\\cobc.exe", "-x", "-std=mf", "c:\\workarea\\gnucobol\\beeb", "$file_name"],
So the build system is correctly finding the file to be compiled. I suspect the configuration error is because the paths that I outlined earlier have not been defined i.e.-- [14:19:25] Building: GnuCOBOL: BBCB.cbl
-- Command: ['c:\\GnuCOBOL\\bin\\cobc.exe', '-x', '-std=mf', 'c:\\workarea\\gnucobol\\beeb', 'BBCB.cbl']
-- Working dir: C:\WORKAREA\GnuCOBOL\BEEB
configuration error:
mf.conf: No such file or directory
default.conf: No such file or directory
-- Done (1.0s), return code: 1
The files mf.conf and default.conf are found in c:\gnucobol\config (set COB_CONFIG_DIR=c:\gnucobol\config). So is there a way to define these file paths?set Path=c:\gnucobol\bin
set COB_CONFIG_DIR=c:\gnucobol\config
set COB_COPY_DIR=c:\gnucobol\copy
set COB_INCLUDE_PATH=c:\gnucobol\include
set COB_LIB_PATH=c:\gnucobol\lib
-
- Posts: 2265
- Joined: 25.08.2021 18:15
https://github.com/Alexey-T/CudaText/issues/5136
i have to post on github. because SF.net bans my reply on this forum.
reply here on forum.
i have to post on github. because SF.net bans my reply on this forum.
reply here on forum.
-
- Posts: 2265
- Joined: 25.08.2021 18:15
i tested build-system on this file and compiler makes the test.exe.
running test.exe gives error about missing libcob-4.dll.
Code: Select all
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. IDSAMPLE.
000300 ENVIRONMENT DIVISION.
000400 PROCEDURE DIVISION.
000500 DISPLAY 'HELLO WORLD'.
000600 STOP RUN.