warning: unable to find mkoctfile in expected location - Win XP MSVC build

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

warning: unable to find mkoctfile in expected location - Win XP MSVC build

Richard Crozier
Hi,

I'm trying to build the example mex function from the manual:

http://www.gnu.org/software/octave/doc/interpreter/Getting-Started-with-Mex_002dFiles.html#Getting-Started-with-Mex_002dFiles

using the MSVC build of Octave on Windows XP 32 Bit, but am getting the following output.

octave-3.6.2.exe:15> mex firstmexdemo.c -v
cc-msvc -d -c -D_WIN32 -DWIN32 -D__WIN32__  -IC:\Octave\Octave-3.6.2\include\octave-3.6.2\octave\.. -IC:\Octave\Octave-3.6.2\
include\octave-3.6.2\octave -IC:\Octave\Octave-3.6.2\include  -O2 -MD -wd4244 -fp:strict -fp:except-    -I.  firstmexdemo.c -
o firstmexdemo.o
cl -nologo -c -D_WIN32 -DWIN32 -D__WIN32__ -IC:\Octave\Octave-3.6.2\include\octave-3.6.2\octave\.. -IC:\Octave\Octave-3.6.2\i
nclude\octave-3.6.2\octave -IC:\Octave\Octave-3.6.2\include -O2 -MD -wd4244 -fp:strict -fp:except- -I. firstmexdemo.c -Fofirs
tmexdemo.o
cc-msvc -d -shared  -o firstmexdemo.mex  firstmexdemo.o   -Wl,-export:mexFunction -LC:\Octave\Octave-3.6.2\lib\octave\3.6.2 -
LC:\Octave\Octave-3.6.2\lib -loctinterp -loctave -lcruft
link -nologo -DLL -out:firstmexdemo.mex firstmexdemo.o -LIBPATH:C:\Octave\Octave-3.6.2\lib\octave\3.6.2 -LIBPATH:C:\Octave\Oc
tave-3.6.2\lib octinterp.lib octave.lib cruft.lib -export:mexFunction dirent.lib msvcmath.lib
warning: unable to find mkoctfile in expected location: `C:\Octave\Octave-3.6.2\bin\mkoctfile-3.6.2'
warning: mkoctfile exited with failure status
octave-3.6.2.exe:16>


Any suggestions for what I'm doing wrong? The file 'mkoctfile-3.6.2.exe' is in the specified location.
Reply | Threaded
Open this post in threaded view
|

Re: warning: unable to find mkoctfile in expected location - Win XP MSVC build

Michael Goffioul
On Tue, Nov 6, 2012 at 12:11 PM, Richard Crozier <[hidden email]> wrote:
Hi,

I'm trying to build the example mex function from the manual:

http://www.gnu.org/software/octave/doc/interpreter/Getting-Started-with-Mex_002dFiles.html#Getting-Started-with-Mex_002dFiles

using the MSVC build of Octave on Windows XP 32 Bit, but am getting the
following output.

octave-3.6.2.exe:15> mex firstmexdemo.c -v
cc-msvc -d -c -D_WIN32 -DWIN32 -D__WIN32__
-IC:\Octave\Octave-3.6.2\include\octave-3.6.2\octave\..
-IC:\Octave\Octave-3.6.2\
include\octave-3.6.2\octave -IC:\Octave\Octave-3.6.2\include  -O2 -MD
-wd4244 -fp:strict -fp:except-    -I.  firstmexdemo.c -
o firstmexdemo.o
cl -nologo -c -D_WIN32 -DWIN32 -D__WIN32__
-IC:\Octave\Octave-3.6.2\include\octave-3.6.2\octave\..
-IC:\Octave\Octave-3.6.2\i
nclude\octave-3.6.2\octave -IC:\Octave\Octave-3.6.2\include -O2 -MD -wd4244
-fp:strict -fp:except- -I. firstmexdemo.c -Fofirs
tmexdemo.o
cc-msvc -d -shared  -o firstmexdemo.mex  firstmexdemo.o
-Wl,-export:mexFunction -LC:\Octave\Octave-3.6.2\lib\octave\3.6.2 -
LC:\Octave\Octave-3.6.2\lib -loctinterp -loctave -lcruft
link -nologo -DLL -out:firstmexdemo.mex firstmexdemo.o
-LIBPATH:C:\Octave\Octave-3.6.2\lib\octave\3.6.2 -LIBPATH:C:\Octave\Oc
tave-3.6.2\lib octinterp.lib octave.lib cruft.lib -export:mexFunction
dirent.lib msvcmath.lib
warning: unable to find mkoctfile in expected location:
`C:\Octave\Octave-3.6.2\bin\mkoctfile-3.6.2'
warning: mkoctfile exited with failure status
octave-3.6.2.exe:16>


Any suggestions for what I'm doing wrong? The file 'mkoctfile-3.6.2.exe' is
in the specified location.

Do you have VS2010 installed and accessible in your PATH?

Michael.


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: warning: unable to find mkoctfile in expected location - Win XP MSVC build

Richard Crozier-3
On 06/11/2012 17:40, Michael Goffioul wrote:
On Tue, Nov 6, 2012 at 12:11 PM, Richard Crozier <[hidden email]> wrote:
Hi,

I'm trying to build the example mex function from the manual:

http://www.gnu.org/software/octave/doc/interpreter/Getting-Started-with-Mex_002dFiles.html#Getting-Started-with-Mex_002dFiles

using the MSVC build of Octave on Windows XP 32 Bit, but am getting the
following output.

octave-3.6.2.exe:15> mex firstmexdemo.c -v
cc-msvc -d -c -D_WIN32 -DWIN32 -D__WIN32__
-IC:\Octave\Octave-3.6.2\include\octave-3.6.2\octave\..
-IC:\Octave\Octave-3.6.2\
include\octave-3.6.2\octave -IC:\Octave\Octave-3.6.2\include  -O2 -MD
-wd4244 -fp:strict -fp:except-    -I.  firstmexdemo.c -
o firstmexdemo.o
cl -nologo -c -D_WIN32 -DWIN32 -D__WIN32__
-IC:\Octave\Octave-3.6.2\include\octave-3.6.2\octave\..
-IC:\Octave\Octave-3.6.2\i
nclude\octave-3.6.2\octave -IC:\Octave\Octave-3.6.2\include -O2 -MD -wd4244
-fp:strict -fp:except- -I. firstmexdemo.c -Fofirs
tmexdemo.o
cc-msvc -d -shared  -o firstmexdemo.mex  firstmexdemo.o
-Wl,-export:mexFunction -LC:\Octave\Octave-3.6.2\lib\octave\3.6.2 -
LC:\Octave\Octave-3.6.2\lib -loctinterp -loctave -lcruft
link -nologo -DLL -out:firstmexdemo.mex firstmexdemo.o
-LIBPATH:C:\Octave\Octave-3.6.2\lib\octave\3.6.2 -LIBPATH:C:\Octave\Oc
tave-3.6.2\lib octinterp.lib octave.lib cruft.lib -export:mexFunction
dirent.lib msvcmath.lib
warning: unable to find mkoctfile in expected location:
`C:\Octave\Octave-3.6.2\bin\mkoctfile-3.6.2'
warning: mkoctfile exited with failure status
octave-3.6.2.exe:16>


Any suggestions for what I'm doing wrong? The file 'mkoctfile-3.6.2.exe' is
in the specified location.

Do you have VS2010 installed and accessible in your PATH?

Michael.



Hi, I wasn't expecting a reply so quickly. I have MSVC++ 2010 Express Edition installed. However, I found that calling cl.exe from the command line doesn't work, as I get an error about mspdb100.dll being not found. After some investigation I added the directory for the VS IDE, which contains mspdb100.dll to my path. This also didn't work. However, if I run vcvars32.bat, to set up all the environment variables for the VS IDE in the command shell before starting octave, it does appear to work. I get:

octave:2> mex firstmexdemo.c -v
cc-msvc -d -c -D_WIN32 -DWIN32 -D__WIN32__  -IC:\Octave\Octave-3.6.2\include\octave-3.6.2\octave\.. -IC:\Octave\Octave-3.6.2\
include\octave-3.6.2\octave -IC:\Octave\Octave-3.6.2\include  -O2 -MD -wd4244 -fp:strict -fp:except-    -I.  firstmexdemo.c -
o firstmexdemo.o
cl -nologo -c -D_WIN32 -DWIN32 -D__WIN32__ -IC:\Octave\Octave-3.6.2\include\octave-3.6.2\octave\.. -IC:\Octave\Octave-3.6.2\i
nclude\octave-3.6.2\octave -IC:\Octave\Octave-3.6.2\include -O2 -MD -wd4244 -fp:strict -fp:except- -I. firstmexdemo.c -Fofirs
tmexdemo.o
firstmexdemo.c
cc-msvc -d -shared  -o firstmexdemo.mex  firstmexdemo.o   -Wl,-export:mexFunction -LC:\Octave\Octave-3.6.2\lib\octave\3.6.2 -
LC:\Octave\Octave-3.6.2\lib -loctinterp -loctave -lcruft
link -nologo -DLL -out:firstmexdemo.mex firstmexdemo.o -LIBPATH:C:\Octave\Octave-3.6.2\lib\octave\3.6.2 -LIBPATH:C:\Octave\Oc
tave-3.6.2\lib octinterp.lib octave.lib cruft.lib -export:mexFunction dirent.lib msvcmath.lib
   Creating library firstmexdemo.lib and object firstmexdemo.exp
octave:3>

For others, on my system the vcvars32.bat file is located at c:\Program Files\Microsoft Visual Studio 10.0\VC\bin

If I close the command window, and launch octave again from a shortcut, I get the error again, so the variables don't seem to persist, what a pain. Any idea how to adjust my setup to set up the variables automatically?

Richard


The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: warning: unable to find mkoctfile in expected location - Win XP MSVC build

vinukn
Run vc  ,from tools menu choose visual studio command prompt, type octave. Then type mkoctfile --mex firstmexdemo.c -o firstmexdemo.mex this command will create a mex file. Type firstmexdemo() to run.