help-octave
[Top][All Lists]
Advanced

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

Re: Installing Octave Interface for Liblinear


From: Freddy López
Subject: Re: Installing Octave Interface for Liblinear
Date: Wed, 9 Mar 2011 00:49:33 -0400

Hello,

And, how to compile LIBLINEAR under Windows?

Although this is not an exactly answer to sazerac, it will be useful
for some people are looking for it by there.

I modified the make.m file to this one:

% This make.m is used under Windows

mex -c '..\blas\daxpy.c'
mex -c '..\blas\ddot.c'
mex -c '..\blas\dnrm2.c'
mex -c '..\blas\dscal.c'
mex -c '..\linear.cpp'
mex -c '..\tron.cpp'
mex "-Wp,-DMX_API_VER=0x07030001" -c '..\linear.cpp'
mex "-Wp,-DMX_API_VER=0x07030001" -c '..\tron.cpp'
mex "-Wp,-DMX_API_VER=0x07030001" -c linear_model_matlab.c -I..\\
mex "-Wp,-DMX_API_VER=0x07030001" train.c -I..\\ '..\tron.o'
'..\linear.o' linear_model_matlab.o '..\blas\dscal.o'
mex "-Wp,-DMX_API_VER=0x07030001" train.c -I..\\ '..\tron.o'
'..\linear.o' linear_model_matlab.o '..\blas\dnrm2.o'
mex "-Wp,-DMX_API_VER=0x07030001" train.c -I..\\ '..\tron.o'
'..\linear.o' linear_model_matlab.o '..\blas\ddot.o'
mex "-Wp,-DMX_API_VER=0x07030001" train.c -I..\\ '..\tron.o'
'..\linear.o' linear_model_matlab.o '..\blas\daxpy.o'
mex "-Wp,-DMX_API_VER=0x07030001" predict.c -I..\\ '..\tron.o'
'..\linear.o' linear_model_matlab.o '..\blas\dscal.o'
mex "-Wp,-DMX_API_VER=0x07030001" predict.c -I..\\ '..\tron.o'
'..\linear.o' linear_model_matlab.o '..\blas\dnrm2.o'
mex "-Wp,-DMX_API_VER=0x07030001" predict.c -I..\\ '..\tron.o'
'..\linear.o' linear_model_matlab.o '..\blas\ddot.o'
mex "-Wp,-DMX_API_VER=0x07030001" predict.c -I..\\ '..\tron.o'
'..\linear.o' linear_model_matlab.o '..\blas\daxpy.o'
mex "-Wp,-DMX_API_VER=0x07030001" libsvmread.c
mex "-Wp,-DMX_API_VER=0x07030001" libsvmwrite.c

and it run perfectly (tested with the README file's example inside
liblinear folder).

Cheers.

On Wed, Feb 23, 2011 at 08:25, Andy Buckle <address@hidden> wrote:
>
> On Wed, Feb 23, 2011 at 12:00 PM, Benjamin Lindner <address@hidden> wrote:
> >> Thank you for your response. I think "-O" stands for "optimize".
> >
> > Oh, I see, it's a gcc option. Well these are not supported in mkoctfile.
> > Neither, by the way, is the flag -largeArrayDims (it's interpreted as
> > adding the library libargeArrayDims to the linker command line), the
> > flag -outdir, and wildcard patterns for the input.
> > So you can't use this make.m file with octave - you have to rewrite it
> > to use one statement per file, and remove the unsupported flags, and
> > remove the double-definition error on "mwIndex", and either escape the
> > backslash or use single quotes, like such
> >
> > mex -c '..\blas\daxpy.c'
> > mex -c '..\blas\ddot.c'
> > mex -c '..\blas\dnrm2.c'
> > mex -c '..\blas\dscal.c'
> > mex -c '..\linear.cpp'
> > mex -c '..\tron.cpp'
> > mex -DMX_API_VER=0x07030000 -c linear_model_matlab.c -I..\\
> > mex -DMX_API_VER=0x07030000 train.c -I..\\ '..\tron.o' '..\linear.o'
> > linear_model_matlab.o '..\blas\daxpy.o' '..\blas\ddot.o'
> > '..\blas\dnrm2.o' '..\blas\dscal.o'
> > mex -DMX_API_VER=0x07030000 predict.c -I..\\ '..\tron.o' '..\linear.o'
> > linear_model_matlab.o '..\blas\daxpy.o' '..\blas\ddot.o'
> > '..\blas\dnrm2.o' '..\blas\dscal.o'
> > mex -DMX_API_VER=0x07030000 libsvmread.c
> > mex -DMX_API_VER=0x07030000 libsvmwrite.c
> >
> > Now compilation works for me.
> > Mind, I can't test whether the functions perform now as expected,
> > being no expert on the topic, so you have to do this yourself!
> >
> > benjamin
>
> When call mkoctfile with -v, I see the underlying compiler call is
> using -O3. (sf.net 3.2.4 installer on windows xp).
>
> >mkoctfile -v  vec_fun_practice.cpp
> mingw32-g++-4.4.0-dw2 -c -I/usr/local/octmgw32_gcc-4.4.0-dw2/include  
> -IC:\Octav
> e\3.2.4_gcc-4.4.0\include\octave-3.2.4 
> -IC:\Octave\3.2.4_gcc-4.4.0\include\octav
> e-3.2.4\octave -IC:\Octave\3.2.4_gcc-4.4.0\include -mieee-fp  -D_GLIBCXX_DLL 
> -ma
> rch=i686 -mtune=generic -O3 -Wall    vec_fun_practice.cpp -o 
> vec_fun_practice.o
> mingw32-g++-4.4.0-dw2 -shared -Wl,--export-all-symbols 
> -Wl,--enable-auto-import
> -Wl,--enable-runtime-pseudo-reloc -shared-libgcc 
> -Wl,--allow-multiple-definition
>  -o vec_fun_practice.oct  vec_fun_practice.o   
> -LC:\Octave\3.2.4_gcc-4.4.0\lib\
> octave-3.2.4 -LC:\Octave\3.2.4_gcc-4.4.0\lib -loctinterp -loctave  -lcruft 
> -shar
> ed-libgcc -Wl,--allow-multiple-definition -llapack -lblas -lfftw3 -lfftw3f 
> -lrea
> dline  -lncurses -liberty -lhdf5 -lz -lm  -lgdi32 -lws2_32 -luser32 
> -lkernel32 -
> lgfortran -lstdc++_s
>
> --
> /* andy buckle */
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave



--
«But Gwindor answered: 'The doom lies in yourself, not in your name.'»

JRR Tolkien


reply via email to

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