Results 1 to 3 of 3

Thread: Problems compiling sdl.pas with D2010

  1. #1

    Problems compiling sdl.pas with D2010

    Hey PGD-friends.

    I just installed Delphi 2010 (Needed an update as I was still using BDS2006). However, I can't compile my engine anymore.

    Code:
    {$IFDEF __MACH__}
      GPCMacOSAll;
    {$ENDIF}
    
    const       //<<< ERROR HERE:
    {$IFDEF WINDOWS}
      SDLLibName = 'SDL.dll';
    {$ENDIF}
    It says:

    [DCC Error] sdl.pas(35: E2029 Identifier expected but 'CONST' found
    If I put an arbitrary unit in the uses clause and close with a semilicon, the problem is solved, but another one will pop up:

    [DCC Error] sdl.pas(2217): E2003 Undeclared identifier: 'Sem_t'
    What's going on here?

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

  2. #2
    I solved my problem by adding the following to the jedi-sdl.inc file:

    Code:
    {$IFDEF ver200}
       {$DEFINE Delphi}      {Delphi 2009}
       {$DEFINE Delphi32}
       {$DEFINE Delphi4UP}
       {$DEFINE Delphi5UP}
       {$DEFINE Delphi6UP}
       {$DEFINE Delphi7UP}
       {$DEFINE Delphi8UP}
       {$DEFINE Delphi9UP}
       {$DEFINE Delphi10UP}
       {$DEFINE Delphi11UP}
       {$DEFINE Delphi12UP}
       {$WARN UNSAFE_TYPE OFF} {Disable warning for unsafe types in Delphi 7}
       {$DEFINE Has_Int64}
       {$DEFINE HAS_TYPES}
    {$ENDIF ver200}
    
    {$IFDEF ver210}
       {$DEFINE Delphi}      {Delphi 2010}
       {$DEFINE Delphi32}
       {$DEFINE Delphi4UP}
       {$DEFINE Delphi5UP}
       {$DEFINE Delphi6UP}
       {$DEFINE Delphi7UP}
       {$DEFINE Delphi8UP}
       {$DEFINE Delphi9UP}
       {$DEFINE Delphi10UP}
       {$DEFINE Delphi11UP}
       {$DEFINE Delphi12UP}
       {$DEFINE Delphi13UP}
       {$WARN UNSAFE_TYPE OFF} {Disable warning for unsafe types in Delphi 7}
       {$DEFINE Has_Int64}
       {$DEFINE HAS_TYPES}
    {$ENDIF ver200}
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  3. #3
    Nice fix Nathan! I had exactly the same issue today when I was trying to compile SDL.pas under D2010, but it worked in Lazarus...

    It is now solved thanks to you

    cheers,
    Paul

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
  •  
Comodo SSL