Using EXTFH instead CTEXTFH works fine and generates no error. So we guess we need to set the information to find our CTEXTFH file maybe with help of -L/home/gnucobol/c-treeRTG-Cobol.linux.x64.64bit.v3.0.0.144/drivers/ctree.cobol/extfh option, but the result is the same.
As you internally static link with -fcallfh=CTEXTFH (there is on open request to allow dynamic linking) you need to pass the library, too.
I guess that would be:
cobc -x -fcallfh=CTEXTFH benchmark.cbl -L/home/gnucobol/c-treeRTG-Cobol.linux.x64.64bit.v3.0.0.144/drivers/ctree.cobol/extfh -lCTEXTFH (you possibly have to adjust the -l parameter to match the library name where the CREXTFH entry point is found),
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sounds good, so the next thing is to deep-check if everything works as expected, including different formats (fixed/variable record), datatypes, locking. If you have an update on the test results another post would be appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
we are trying to run GNUCOBOL with c-tree file system instead of default BDB on linux 64 bit system using version 3.1.2.0 of GnuCOBOL.
In the Getting started we found an option -fcallfh to set a name to be used for I/O as external provided EXTFH interface module.
c-tree itself delivers an EXTFH file in form of a .so with name CTEXTFH.so file or in form of a .a file.
Known from other compiler the .so file should work.
We set up the following:
cobc -x -fcallfh=CTEXTFH benchmark.cbl
error:
If we using no -x in the compile command no error is shown and a benchmark.so is produced, but showing a error while runtime:
Using EXTFH instead CTEXTFH works fine and generates no error. So we guess we need to set the information to find our CTEXTFH file maybe with help of -L/home/gnucobol/c-treeRTG-Cobol.linux.x64.64bit.v3.0.0.144/drivers/ctree.cobol/extfh option, but the result is the same.
benchmark.cbl -L/home/gnucobol/c-treeRTG-Cobol.linux.x64.64bit.v3.0.0.144/drivers/ctree.cobol/extfh
Using cobc -x -fcallfh=CTEXTFH.so generates another error:
In another issue of this forum we see that another EXTFH test works using .o files, but this does not help us solving our problem with the .so
Maybe you got an idea what we doing wrong or what we forget to set in our testcase.
PS: With standard BDB file system the program compiles and run fine.
If you need sample files, we can attach them.
Kind regards
Sebastian Steinweg
EasiRun Europa
As you internally static link with
-fcallfh=CTEXTFH
(there is on open request to allow dynamic linking) you need to pass the library, too.I guess that would be:
cobc -x -fcallfh=CTEXTFH benchmark.cbl -L/home/gnucobol/c-treeRTG-Cobol.linux.x64.64bit.v3.0.0.144/drivers/ctree.cobol/extfh -lCTEXTFH
(you possibly have to adjust the-l
parameter to match the library name where theCREXTFH
entry point is found),Thank you for the hint.
we link the static .a ibrary, but it was also neccessary to link some more libraryies from system and c-tree to our command:
With these command we are now able to combine GnuCOBOL & c-tree. The data was placed correctly into the DB!
Sounds good, so the next thing is to deep-check if everything works as expected, including different formats (fixed/variable record), datatypes, locking. If you have an update on the test results another post would be appreciated.