Results 1 to 3 of 3

Thread: Errors while setting up my own project

  1. #1

    Errors while setting up my own project

    Hey,

    I'm trying to set up my own ZenGL project, but after moving the zengl source files and setting the paths, i get this error:

    Code:
    G:\proj\defender\zengl\src\zgl_application.pas(70,31) Error: Incompatible types: got "app_Init;" expected "<procedure variable type of procedure;Register>"
    G:\proj\defender\zengl\src\zgl_application.pas(71,31) Error: Incompatible types: got "app_MainLoop;" expected "<procedure variable type of procedure;Register>"
    G:\proj\defender\zengl\src\zgl_application.pas(72,31) Error: Incompatible types: got "zero;" expected "<procedure variable type of procedure;Register>"
    G:\proj\defender\zengl\src\zgl_application.pas(73,31) Error: Incompatible types: got "zero;" expected "<procedure variable type of procedure;Register>"
    G:\proj\defender\zengl\src\zgl_application.pas(74,31) Error: Incompatible types: got "zero;" expected "<procedure variable type of procedure;Register>"
    G:\proj\defender\zengl\src\zgl_application.pas(75,46) Error: Incompatible types: got "zerou(Double);" expected "<procedure variable type of procedure(Double);Register>"
    G:\proj\defender\zengl\src\zgl_application.pas(76,53) Error: Incompatible types: got "zeroa(Boolean);" expected "<procedure variable type of procedure(Boolean);Register>"
    G:\proj\defender\zengl\src\zgl_application.pas(96,1) Fatal: There were 7 errors compiling module, stopping
    on these lines:

    Code:
      // call-back
      app_PInit     : procedure = app_Init;
      app_PLoop     : procedure = app_MainLoop;
      app_PLoad     : procedure = zero;
      app_PDraw     : procedure = zero;
      app_PExit     : procedure = zero;
      app_PUpdate   : procedure( dt : Double ) = zerou;
      app_PActivate : procedure( activate : Boolean ) = zeroa;
    I don't understand this. I have taken the code from the "Initialization" demo. I only moved the zengl source and changed the paths.

    Inserting @ sings for all the procedure names after the "=" helps, but then a new error in another file pops up.
    I suspect the error is related to using the wrong $MODE. I'm using Lazarus 0.9.30.

    Can somebody help me here?

    Thanks
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  2. #2
    I was right. it was the mode!

    I discovered that you can change this mode for your whole project:

    Project -> Project options -> Compiler options -> Parsing (Syntax mode)

    Very handy, because I was under the impression that you HAD to use the {$MODE xxx} compiler directive.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  3. #3
    I will try to not forget about MODE directive in next release, but I'm too lazy...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •