|
From: | Chieh-Yen |
Subject: | Re: LIBLINEAR octave make file |
Date: | Tue, 20 May 2014 23:16:18 +0800 |
On Mon, May 19, 2014 at 5:39 PM, Chieh-Yen <address@hidden> wrote:
_______________________________________________Dear all,I am one of the maintainers of LIBLINEAR.I tried to make the octave binary of LIBLINEAR-1.94.In octave 3.2.4, the original make file works finebut fails when using octave 3.8.1.The original make file is :==mex train.c linear_model_matlab.c ../linear.cpp ../tron.cpp ../blas/*.c==But the compiler shows error message:"gcc: fatal error: cannot specify -o with -c, -S or -E with multiple files"
I think mex parse the commandmex train.c linear_model_matlab.c ../linear.cpp ../tron.cpp ../blas/*.cto another command containing target file name, object file names,-c and -o together.It is obvious that the command is ambiguous.The problem could be solved by separating the compiling and linking steps as==mex -c linear_model_matlab.c ../linear.cpp ../tron.cpp ../blas/*.cmex train.c==However, it's strange why it worked before but not right now.Can anyone explain it or offer any comment?Thanks a lot.Best regards,Chieh-Yen
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave
Hello Chieh-Yen,I tried to compile your library and the problem lies in the wildcard command "../blas/*.c". mkoctfile and mex make individual calls for compilation and stores the .o files in the calling directory. Even with GCC it is not possible to run a statement like this. Maybe you try the compiler flag "-v" to see the difference from Octave 3.2 to 3.8, I don't have 3.2 installed.mex -v train.c linear_model_matlab.c ../linear.cpp ../tron.cpp ../blas/daxpy.c ../blas/ddot.c ../blas/dnrm2.c ../blas/dscal.c %MODIFIED!!clang -c [snip] train.c -o train.oclang -c [snip] linear_model_matlab.c -o linear_model_matlab.oclang -c [snip] ../blas/daxpy.c -o daxpy.o[snip]clang++ -c [snip] ../linear.cpp -o linear.o[snip]clang++ -shared -Wl,-Bsymbolic -o train.mex train.o linear_model_matlab.o daxpy.o ddot.o dnrm2.o dscal.o linear.o tron.o -L/usr/local/lib/octave/4.1.0+ -L/usr/local/lib -loctinterp -loctaveHTH,Kai
[Prev in Thread] | Current Thread | [Next in Thread] |