Problems with Mathlink examples. Help needed.

*To*: mathgroup at smc.vnet.net*Subject*: [mg24113] Problems with Mathlink examples. Help needed.*From*: Fredrik Ingvarson <fredrik at ic.chalmers.se>*Date*: Wed, 28 Jun 2000 02:11:37 -0400 (EDT)*Organization*: Chalmers University of Technology*Sender*: owner-wri-mathgroup at wolfram.com

I've tried to build the addtwo.PPC application using MPW 3.5 for the Macintosh but an error is reported when compiling the source code generated by mprep. I copied and pasted (and executed) the following from the Mathematica book into the MPW shell: set MathLink "Macintosh HD:Applikationer:Mathematica 4.0 Files:AddOns:MathLink:DevelopersKits:Macintosh:MathLink Compiler Additions:" export MathLink set Commands "{Commands},{MathLink}" export Commands files "{MathLink}mathlink.h" "{MathLink}MathLinkStubs" which mprep 'Macintosh HD:Applikationer:Mathematica 4.0 Files:AddOns:MathLink:DevelopersKits:Macintosh:MathLink Compiler Additions:mathlink.h' 'Macintosh HD:Applikationer:Mathematica 4.0 Files:AddOns:MathLink:DevelopersKits:Macintosh:MathLink Compiler Additions:MathLinkStubs' 'Macintosh HD:Applikationer:Mathematica 4.0 Files:AddOns:MathLink:DevelopersKits:Macintosh:MathLink Compiler Additions:mprep' setdirectory "{MathLink}:MathLink Examples:" mprep addtwo.tm -o addtwo.tm.c -r addtwo.tm.r Rez addtwo.tm.r -o addtwo.PPC MrC -sym on -i "{MathLink}" addtwo.c -o addtwo.c.x MrC -sym on -i "{MathLink}" addtwo.tm.c -o addtwo.tm.c.x MrC C Compiler 4.1.0f1c1 Copyright (C) 1994-1999 by Apple Computer, Inc. HiliteControl( okHdl, kControlButtonPart); ^ File "addtwo.tm.c"; line 170 #Error: undefined identifier 'kControlButtonPart' #----------------------- I'm using the following: In[2]:=$Version Out[2]="4.0 for Power Macintosh (May 9, 1999)" PowerMac G3 MacOS 8.6 MPW GM 3.5 MathLink Revision 7 Since this is the first time I've tried Mathlink (and MPW) I would very much appreciate som help. /Fredrik Ingvarson