Re: newbie question: creating my first mex-file - compiling on windows xp



Martin Jørgensen wrote:
> Rune Allnor wrote:
> -snip-
> > As others already have commented, this seems to be abit old. I would
> > get
> > a newer file. There is a PDF file available at the Matworks site. Try
> > "doc mex" at the matlab prompt, and you ought to find it.
>
> I found something with google called "Connecting C and matlab" 4 pages.
> Was that the one you were thinking about?

No, there is something called the "External Interface Guide" (or
something
similar) that is available only as a PDF file from the mathworks.
You find it like this (matlab 7.1):

- Type "doc" at the matlab prompt.
- Expand the MATLAB book in the tree at the left hand side
- Select the "Printable Doucumentation (PDF)" node
- In the main help window you now have a lot of links to PDF
  files available at the mathworks.

Select the "External Interfaces" link, and you should get the
book you need.

....

> > However, you say you want to learn MEX and C at the same time.
> > In that case, you ought to go for a compiler (or rather, Integrated
> > Development Environment, IDE) that catches all those small errors
> > and typos novices make. If you have access to a professional
> > IDE you will almost certainly find it easier to learn C there. I would
> > be very surprised if the MS C++ can not be used under matlab.
>
> Is there anything you recommend for either linux or windows, might also
> be freeware?

For learning how to code, I'd go with the compiler with the best IDE
and support functions. That means that the compiler submits
*intelligable* error messages when it hits invalid code (not very many
compilers do that...) and that provides some sort of debugging and
profiling tools. Those things usually do not come for free. If you
already
have access to a professional edition IDE, that's what you ought to
use.

If you want to play around on your own time and for your own  $$, keep
an eye open for personal edition IDEs. I bought a Borland Personal
edition
for some NOK 1000 (some $120) a few years ago. It is a bit dated and
does not have all the bells and whistles that come with the pro
version,
but it works.

The one thing I would suggest, is that you stick with ANSI C code.
It's a lot easier to port your programs if you manage to do that.
You need to flick some switches here and there in the IDE
to force the compiler in that direction. Ask the support service
at your compiler vendor.
 
Rune

.



Relevant Pages

  • Re: newbie question: creating my first mex-file - compiling on windows xp
    ... something similar) that is available only as a PDF file from the mathworks. ... In the main help window you now have a lot of links to PDF files available at the mathworks. ... In that case, you ought to go for a compiler (or rather, Integrated Development Environment, IDE) that catches all those small errors and typos novices make. ...
    (comp.soft-sys.matlab)
  • Re: Looking for a free basic compiler for DOS
    ... BC for 7.1 had a lot of compiler switchable options, ... NEVER compile from the ide. ... One trivial example: I have a routine declared as: ... were no manuals, just a readme file. ...
    (comp.lang.basic.misc)
  • Re: HPGCC Questions ladies and gentlemen!!!
    ... free compiler to learn C today I would choose MS Visual C++ Express ... ANSI C has been deprecated but it's still there and the IDE ... Create the program with your favourite text editor, call it, say, hello.c ... Project management is nothing exclusive to IDE's -- there are many ...
    (comp.sys.hp48)
  • "Good" versus "bad" IDEs. Re: BlackBox version 1.4 or 1.5Beta?
    ... why I believe the System 3 IDE is superior to TP 3.0. ... I don't want a list of compiler errors [as a demonstration ... > I DO want the first error to be shown immediately/automatically ... TP and Oberon, but I forget how the compiler I used ...
    (comp.lang.oberon)
  • Re: HPGCC Questions ladies and gentlemen!!!
    ... Frank Pittel wrote: ... free compiler to learn C today I would choose MS Visual C++ Express ... ANSI C has been deprecated but it's still there and the IDE ... Create the program with your favourite text editor, call it, say, hello.c ...
    (comp.sys.hp48)