Chaosforge Forum
Coding => FPC Valkyrie => Topic started by: null1024 on January 30, 2008, 16:52
-
Well, I was trying to compile the test.pas tutorial, and I get this error:
vmsg.pas(30,8) Error: Identifier not found "class"
vmsg.pas(30,8) Error: Error in type definition
vmsg.pas(30,8) Fatal: Syntax error, ";" expected but "identifier PUBLIC" found
vmsg.pas(0) Fatal: Compilation aborted
I was using valkyrie 0.4.2
-
Oh my, the 0.4.2 is VERY outdated. Time to redesign the site and make some official release -_-.
As for your problem, passing -S2 or adding {$mode objfpc} to the program should help.
-
Hmm... this is interesting...
vmsg.pas(30,8) Error: Identifier not found "class"
vmsg.pas(30,8) Error: Error in type definition
vmsg.pas(30,8) Fatal: Syntax error, ";" expected but "identifier PUBLIC" found
vmsg.pas(0) Fatal: Compilation aborted
Compiler switches are:
-Op3 -Sc
And the code is:
{$mode objfpc}
program test;
uses vsystems, // Systems unit
voutput, // Output interface unit
vtoutput, // Output TextMode implementation
vinput, // Input interface unit
vtinput; // Input TextMode implementation
begin
Systems.Add(Output,TTextModeOutput.Init); // Register the Output system
Systems.Add(Input,TTextModeInput.Init); // Register the Input system
Output.CenterDrawString(40,12,Green,'@RH@Ge@Bl@Rl@Go@B World!'); // Draw hello world
Output.Update; // Blit it to the screen
Input.GetKey([VKEY_ENTER,VKEY_ESCAPE]); // Wait for ESC or Enter
end. // Disposal of objects automatic
-
Try -S2 compiler switch
-
Ok, added it (whoops), but now this:
vstream.pas(148,18) Error: function header doesn't match the forward declaration "IOutputStream.Write(const LongInt, Pointer)"
vstream.pas(328,1) Fatal: There were 1 errors compiling module, stopping
vstream.pas(0) Fatal: Compilation aborted
-_-;;;