Programming tools / Compiling source files |
The compiler version used to build the .42m modules must be compatible with the runtime system used to execute the programs. The fglcomp compiler writes version information in the generated 42m files. This can be useful on site, if you need to check the version of the compiler that was used to build the 42m nodules.
$ fglcomp -V fglrun 3.00.12 internal-build-number Genero virtual machine Target l64xl212 ... $ fglrun -V fglrun 3.00.12 internal-build-number Genero virtual machine Target l64xl212 ...
To extract build information from a .42m file, run fglrun with the -b option:
$ fglrun -b mymodule.42m 3.00.00 /home/devel/stores/mymodule.4gl 24
The output shows the following fields:
fglrun -b can read the header of p-code modules compiled with older versions of fglcomp and display version information for such old modules. If fglrun cannot recognize a p-code module, it returns with an execution status that is different from zero.
When reading build information of a 42x or 42r file, fglrun scans all modules used to build the library or program. You will see different versions in the first column if the modules were compiled with different versions of fglcomp. However, it's not recommended that you mix versions on a production site:
$ fglrun -b myprogram.42r 3.00.00 /home/devel/stores/mymodule1.4gl 24 3.10.02 /home/devel/stores/mymodule2.4gl 24 3.00.01 /home/devel/stores/mymodule3.4gl 24
If you need to write timestamp information in the p-code modules, you can use the --timestamp option of fglcomp:
$ fglcomp --timestamp mymodule.4gl $ fglrun -b mymodule.42m 2008-12-24 11:22:33 3.00.12 /home/devel/stores/mymodule.4gl 15
By default, fglcomp writes the source file name (path) in the resulting .42m module. To avoid the source name in the .42m module, you can use the --omit-source-name option of fglcomp. With this option, the source name/path will be replaced by the module name:
$ fglcomp mymodule.4gl $ fglrun -b mymodule.42m 3.00.13 /home/devel/stores/mymodule.4gl 15 $ fglcomp --omit-source-name mymodule.4gl $ fglrun -b mymodule.42m 3.00.13 mymodule 15