I solved my original issues (compiler exiting with an internal error on different occasions and language elements) reported with
https://forum.lazarus.freepascal.org/index.php/topic,61944.0.html. Now I have a local build of the latest PPC386 and PPCJVM. I learned I can activate the features required in the "fpc\rtl\java\rtl.cfg".
With this, I've created minimal Pascal programs that compile successfully now.
In
https://github.com/wudsn/fpc-ppcjvm there are folders with these example
- hello/hello.pas - Without output
program hello(output);
var i: Integer;
begin
(* writeLn('Hello, World!'); *)
for i:=1 to 100 do
begin
ExitCode:=i;
end;
end.
- minimal/minimal.pp - With writeln mapped via marcos
{$ifdef cpujvm}
uses jdk15;
{$macro on}
{$define writeln:=jlsystem.fout.println}
{$define write:=jlsystem.fout.print}
{$else}
uses SysUtils;
{$endif}
As the next step, I'd like to use file IO, but when I activate FILEIO in the rtl.cfg, I get this when building the RTL:
ppcjvm.exe -Tjava -Pjvm -Fi../inc -Fi../jvm -FE. -FU../../rtl/units/jvm-java -djvm @rtl.cfg -Us -Sg system.pp
jsystemh.inc(590,1) Fatal: Cannot find system type "FILEREC". Check if you use the correct run time library.
Does somebody have a tip, how I can continue from here?