help-octave
[Top][All Lists]
Advanced

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

Re: How to use mkoctfile


From: Michael Goffioul
Subject: Re: How to use mkoctfile
Date: Mon, 9 Jul 2012 09:09:24 +0100

On Mon, Jul 9, 2012 at 2:38 AM, mkole <address@hidden> wrote:
SOLVED - but, wow, what a nightmare :-(

Sorry to hear that...
 
I thought I would post my findings in case it might help someone else.
As Michael so kindly explained to me, to produce the .mex files, you need a
compiler.
This is explained in this link:
http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.1%20for%20Windows%20Microsoft%20Visual%20Studio/

You also need to set the environment variables for Octave by calling
vcvarsall.bat in a command prompt prior to executing Octave.

Unfortunately, the 2010 Visual Express that I have does not have the
vcvarsall.bat script that you need to call.

That's weird, I'm using Visual C++ 2010 express edition and I do have the vcvarsall.bat script, in C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat. And alternate solution is to call the script C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat (vcvarsall.bat simply calls this one).

I'm surprised that you didn't have that file. In one of your previous mail, you mentioned you had Visual C# 2010 installed. Note you need the C++ component installed. The Visual Studio suite consists of various compilers (C++, C#, Basic...), installing one of them does not mean you have installed all of them.
 
I tried Visual Basic 2008
Express and that does not have
the .bat file, either.

vcvarsall.bat is part of Visual C++, not Visual Basic.
 
The version you need is Visual C++ 2008 Express
Edition with SP1:
http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express
Once you have installed Visual C++ ... , you can verify that vcvarsall.bat
is in the directory:
C:\Program Files\Microsoft Visual Studio 9.0\VC\

Next, you need to make the call to the .bat file by typing the following
line in the command prompt :
"C\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"

***Note - adapt this to your own path if it varies from mine ***
Also note, I'm on Vista so I'm used to using an elevated prompt ("run as
administrator"), not sure if this is required... but it works for me.

In order to get the mkoctfile to work properly, I had to navigate to the
Octave bin directory:
(In Command Prompt):
>*D:*
D:>*cd Programs\Octave-3.6.1\bin*
D:\Programs\Octave-3.6.1\bin>*mkoctfile.exe --mex -v resampc.c*

***Again, modify paths and filenames to your own situation****
In my case, the file resampc.c was in the bin directory along with
mkoctfile.exe.
The file resampc.mex was created in the bin directory.

You don't need to navigate to the octave bin directory. You can:
1) use the full path to execute mkoctfile
2) add octave bin directory to your PATH environment variable
3) call mkoctfile from octave prompt, this will automatically call the right mkoctfile.exe.

Michael.


reply via email to

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