help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mkoctfile and C


From: Jordi Gutiérrez Hermoso
Subject: Re: mkoctfile and C
Date: Mon, 21 Feb 2011 08:39:14 -0600

On 21 February 2011 03:46, Laurent Hoeltgen <address@hidden> wrote:
> I was wondering if there is some magic behind compiling C code with
> mkoctfile. On the octave webpages, there's this short example written in
> C++ which compiles fine for me. However, I can't get anything to run
> once it's in plain C.

The Octave headers are in C++, so you can't #include them from files
that are intended to be C, which is a different language. The errors
you are seeing are what happens when a C compiler sees C++ code in
oct.h.

You could write C wrappers for the Octave headers, if you want to do the work.

- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]