help-octave
[Top][All Lists]
Advanced

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

Re: Call C++ from Octave


From: Andy Buckle
Subject: Re: Call C++ from Octave
Date: Fri, 16 May 2014 12:29:02 +0100




On 16 May 2014 12:21, angelsanct <address@hidden> wrote:
Dear all,

I'm trying to call C++ from Octave 3.8.1

I created a new Folder, c:\Projects and I add Helloworld.cc file inside it.

#include <octave/oct.h>

DEFUN_DLD (helloworld, args, nargout,
           "Hello World Help String")
{
  int nargin = args.length ();

  octave_stdout << "Hello World has "
                << nargin << " input arguments and "
                << nargout << " output arguments.\n";

  return octave_value_list ();
}

Then from the command window I write this command: mkoctfile -c
helloworld.cc

Octave Returns me this error:
c:\program files\octave-3.8.1\include\setjmp.h:11:32: error: expected
declaration before end of line
 #pragma pack(push,_CRT_PACKING)

What's wrong?


I don't understand that error, but...
Which Windows build of Octave are you using? Compiling from the Windows builds may not be straightforward. I have managed it with this build

http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20Microsoft%20Visual%20Studio/

after following the instructions at point 6 on that page.

--
/* andy buckle */

reply via email to

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