MathGroup Archive 1999

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

Search the Archive

Re: Interfacing C++ code to Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16304] Re: Interfacing C++ code to Mathematica
  • From: Pontus Lidman <pontus at lysator.liu.se>
  • Date: Sun, 7 Mar 1999 01:05:36 -0500
  • Organization: Linköping University, Sweden
  • References: <7bo0on$dpg@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 5 Mar 1999, Roopesh Mathur wrote:

> The problem is that Mathlink code embedded in my C++ program, needs to be
> compiled, while the book recommends 'mcc', which can handle only C code. I
> would like to solve this problem without changing the C++ code to C, since
> I am using the object oriented capabilities of C++ significantly. 

What you need to do is use "mprep" separately, that reads a MathLink
template and produces C source. You can then use a standard C compiler to
produce object code that can be linked together with your C++ code.
Remember to use extern "C" { } when you include any C header file in your 
C++ code.

If you need more details, feel free to drop me an e-mail.

-- 
Pontus Lidman, pontus at mathcore.com, Development & support manager
     All standard disclaimers apply. ---  Void where prohibited.



  • Prev by Date: RE: Front End Stalls When Not On Network
  • Next by Date: Re: Distance problem
  • Previous by thread: Re: Interfacing C++ code to Mathematica
  • Next by thread: Re: DSolve Problem PDT)