Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Prob compiling MathLink code with Carbon

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

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:

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

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

  • 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