NO

Author Topic: Version 9.00 RC1 error #2001  (Read 2008 times)

Offline Robert

  • Member
  • *
  • Posts: 245
Version 9.00 RC1 error #2001
« on: June 05, 2018, 08:46:57 AM »
This legacy code from John Walker's MoonTool

Code: [Select]
extern BOOL FAR PASCAL About(HWND, UINT, WPARAM, LPARAM);
extern BOOL FAR PASCAL SetJdate(HWND, UINT, WPARAM, LPARAM);
extern BOOL FAR PASCAL SetUtime(HWND, UINT, WPARAM, LPARAM);

compiled with Pelles C Version 8.00 but Version 9.00 RC1 throws these errors

Building MOONCALC.obj.
D:\Documents\Pelles C Projects\MoonTool\moontool.h(40): error #2001: Syntax error: expected ';' but found '__stdcall'.
D:\Documents\Pelles C Projects\MoonTool\moontool.h(40): warning #2099: Missing type specifier; assuming 'int'.
D:\Documents\Pelles C Projects\MoonTool\moontool.h(41): error #2001: Syntax error: expected ';' but found '__stdcall'.
D:\Documents\Pelles C Projects\MoonTool\moontool.h(41): warning #2099: Missing type specifier; assuming 'int'.
D:\Documents\Pelles C Projects\MoonTool\moontool.h(42): error #2001: Syntax error: expected ';' but found '__stdcall'.
D:\Documents\Pelles C Projects\MoonTool\moontool.h(42): warning #2099: Missing type specifier; assuming 'int'.
*** Error code: 1 ***
Done.

The MoonTool Project is attached.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Version 9.00 RC1 error #2001
« Reply #1 on: June 05, 2018, 06:22:07 PM »
You need empty definitions for the preprocessor symbols FAR and far - for example "Project Options" -> "Compiler" Tab, "Define preprocessor symbols" field, add the names FAR and far.

I was kind of hoping this 16-bit Windows stuff was gone by now, some 20 years later, but apparently not. Oh well, I will add some FAR/far/NEAR/near definitions for the next upload.

Also, for now, comment out line 10 in MoonTool.rc: #include "moontool.h". This include adds nothing, but will trigger errors about bad compiler version for <time.h>, <stdio.h> etc. Such include files are meaningless for a resource script, but I should handle this better when they are. I will try to fix this for the next upload.
/Pelle