ID: Q130241
2.60a MACINTOSH kbtool kbprb
The information in this article applies to:
When building an LCK Library for FoxPro for Macintosh, using the Macintosh Programmer's Workbench (MPW) version 3.3.1, you may get the error message "Error 53 error in declarator" during the compile phase.
What you actually see on your screen in the MPW 3.3.1 Worksheet window looks something like this:
Compiling Myprogram.c
#void 0xA029
# ?
### Error 53 error in declarator
# ?
### Error 247 Huh ?
There will probably be more information, but the information shown above
illustrates what you should expect to see.
This compilation error is due to a conflict between certain FoxPro API function names and the system header file (Traps.h) provided by Apple. The FoxPro API function names that conflict with Apple's Traps.h file are:
_GlobalToLocal
_FindWindow
_NewMenu
_DisposeMenu
_GetNextEvent
_HLock
MPW 3.3.1 is apparently trying to replace the calls to these functions with
the #define definitions found in the Traps.h file. The example error
message illustrated above points to the line containing "void 0xA029"
because the C program being compiled had a reference to the FoxPro API
function _Hlock(), which MPW 3.3.1 confused with the following line in the
Traps.h file:
#define _HLock 0xA029
Here is a list of the #define commands excerpted from the Traps.h file that cause conflicts with the use of corresponding FoxPro API functions:
/*
; QuickDraw
*/
#define _GlobalToLocal 0xA871
/*
; Toolbox
*/
#define _FindWindow 0xA92C
#define _NewMenu 0xA931
#define _DisposeMenu 0xA932
#define _GetNextEvent 0xA970
/*
; Memory Manager
*/
#define _HLock 0xA029
To correct the problem, run MPW 3.3.1 and edit the Traps.h file. You'll
find it under the folder "MPW Folder:Interfaces:CIncludes." Change the
#define commands listed above into comment lines. Save the Traps.h file,
and re-compile your LCK program. The error should not occur.
Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
When compiling other C programs for the Macintosh and using MPW 3.3.1, use the original copy of the Traps.h file that does not have any #define statements changed to commented. It might be best to keep two copies of the Traps.h file: one for use when building FoxPro API Libraries, and one for use when building Macintosh programs.
NOTE: Macintosh Programmer's Workbench does not come with the Macintosh operating system but can be obtained from the Apple Programmers and Developers Association (APDA) at (800) 282-2732.
NOTE: Some products mentioned in this article are manufactured by vendors independent of Microsoft; we make no warranty, implied or otherwise, regarding these products' performance or reliability.
Additional reference words: FoxMac 2.60a KBCategory: kbtool kbprb KBSubcategory: FxtoolLck
Keywords : kb3rdparty FxtoolLck
Version : 2.60a
Platform : MACINTOSH
Last Reviewed: May 13, 1998