MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Prob compiling MathLink code with Carbon

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45686] Prob compiling MathLink code with Carbon
  • From: n at far-west.net (Norman Packard)
  • Date: Mon, 19 Jan 2004 05:15:31 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Using Xcode 1.1, Mathematica 5.0, I have successfully implemented a
bunch of MathLink code.  But I wanted to link in some low level
graphics, and when I tried to compile them, I ran into conflicts. 
Most of the error messages pointed to "conflicting types" of variables
like kPascalStackBased, pointing to code in MixedMode.h:

/* Calling Conventions */
typedef unsigned short                  CallingConventionType;
enum {
  kPascalStackBased             = 0,
  kCStackBased                  = 1,
  kRegisterBased                = 2,
  kD0DispatchedPascalStackBased = 8,
  kD1DispatchedPascalStackBased = 12,
  kD0DispatchedCStackBased      = 9,
  kStackDispatchedPascalStackBased = 14,
  kThinkCStackBased             = 5
};

But other errors tipped me off that it was a MathLink confflict,
claiming "previous declaration" of same sort of vars in mathlink.h,
pointing to the code:

#if MACINTOSH_MATHLINK
# include <MixedMode.h>
#...
#else
 enum {
  kPascalStackBased = 0,
  kCStackBased = 0,
  kThinkCStackBased = 0
 };
# define SIZE_CODE(size) (0)
# define RESULT_SIZE(sizeCode) (0)
# define STACK_ROUTINE_PARAMETER(whichParam, sizeCode) (0)
#endif

Seems strange, as Mathematica is itself most likely a Carbon app.  Any
help greatly appreciated.
   -Norman


  • Prev by Date: Re: Anyone using the Units package extensively?
  • Next by Date: Re: Pipes Inside Mathematica?
  • Previous by thread: Re: Loading a Package
  • Next by thread: Unexpected behaviour of HoldRest