Coding > FPC Valkyrie

Compile error in vmsg.pas

(1/1)

null1024:
Well, I was trying to compile the test.pas tutorial, and I get this error:

--- Quote ---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

--- End quote ---

I was using valkyrie 0.4.2

Kornel Kisielewicz:
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.

null1024:
Hmm... this is interesting...

--- Quote ---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

--- End quote ---

Compiler switches are:
 -Op3 -Sc

And the code is:

--- Code: ---{$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


--- End code ---

Kornel Kisielewicz:
Try -S2 compiler switch

null1024:
Ok, added it (whoops), but now this:

--- Quote ---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

--- End quote ---

-_-;;;

Navigation

[0] Message Index

Go to full version