Chaosforge Forum

  • December 02, 2024, 04:37
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: Compile error in vmsg.pas  (Read 10908 times)

null1024

  • Private FC
  • *
  • Offline Offline
  • Posts: 5
    • View Profile
Compile error in vmsg.pas
« on: January 30, 2008, 16:52 »

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

I was using valkyrie 0.4.2
Logged

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4576
    • View Profile
    • http://chaosforge.org/
Re: Compile error in vmsg.pas
« Reply #1 on: January 30, 2008, 17:11 »

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.
Logged
at your service,
Kornel Kisielewicz

null1024

  • Private FC
  • *
  • Offline Offline
  • Posts: 5
    • View Profile
Re: Compile error in vmsg.pas
« Reply #2 on: January 30, 2008, 17:38 »

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

Compiler switches are:
 -Op3 -Sc

And the code is:
Code: [Select]
{$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

Logged

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4576
    • View Profile
    • http://chaosforge.org/
Re: Compile error in vmsg.pas
« Reply #3 on: January 31, 2008, 04:02 »

Try -S2 compiler switch
Logged
at your service,
Kornel Kisielewicz

null1024

  • Private FC
  • *
  • Offline Offline
  • Posts: 5
    • View Profile
Re: Compile error in vmsg.pas
« Reply #4 on: January 31, 2008, 14:11 »

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

-_-;;;
Logged
Pages: [1]