Open ChihChengLiang opened 10 years ago
or compile the files using common/minFunc_2012/mexAll.m
I had to change mexAll.m to compile without error on Octave 3.8.1 on OS X:
mexAll.m >>>>>>>>>>>> % minFunc fprintf('Compiling minFunc files...\n'); mex -o minFunc/compiled/mcholC.mex minFunc/mex/mcholC.c mex -o minFunc/compiled/lbfgsC.mex minFunc/mex/lbfgsC.c mex -o minFunc/compiled/lbfgsAddC.mex minFunc/mex/lbfgsAddC.c mex -o minFunc/compiled/lbfgsProdC.mex minFunc/mex/lbfgsProdC.c
You get the error "??? Undefined function or method 'lbfgsAddC'". This occurs if Matlab can't find the mex file for your operating system. If this occurs, you can either: (i) set 'options.useMex' to 0, or (ii) compile the mex file for your operating system by running the mexAll function. If you end up compiling a file in minFunc for your operating system, please send it to me and I will add to the distribution.
Though, modifying mexAll
as to compile all relevant files (lbgfs*.c) solved the issue for me.
@nicsurpatanu i modify mexAll.m as you did, however when run run mexAll cmd in the octave-cli ,i got a err message like folllows and the mexAll.m is as follow
1 % minFunc
2 fprintf('Compiling minFunc files...\n');
3 mex -o minFunc/compiled minFunc/mex/mcholC.c
4 mex -o minFunc/compiled minFunc/mex/lbfgsC.c
5 mex -o minFunc/compiled minFunc/mex/lbfgsAddC.c
6 mex -o minFunc/compiled minFunc/mex/lbfgsProdC.c
7```
@osoylemez how to compile all relevant files?
when running
octave ex1a_linreg.m
get the following errorsolve it with modifying
ex1a_linreg.m
line 46 to