Re: LEVMAR with MEX



Thank you for your answer, James.

I have uncomment to line in levmar.h (29): #define HAVE_LAPACK

With LCC I get the error msg:
----------------------------------
Writing library for levmar.mexw32 Axb.obj .text: undefined reference to '__imp__free' Axb.obj .text: undefined reference to '_dgeqrf_' Axb.obj .text: undefined reference to '__ftol2_sse' Axb.obj .text: undefined reference to '__imp____iob_func' Axb.obj .text: undefined reference to '__imp__exit' Axb.obj .text: undefined reference to '_dorgqr_' Axb.obj .text: undefined reference to '_dtrtrs_' Axb.obj .text: undefined reference to '_dpotrf_' Axb.obj .text: undefined reference to '_dpotrs_' Axb.obj .text: undefined reference to '_dgetrf_' Axb.obj .text: undefined reference to '_dgetrs_' Axb.obj .text: undefined reference to '_dgesvd_' Axb.obj .text: undefined reference to '_dsytrf_' Axb.obj .text: undefined reference to '_dsytrs_' Axb.obj .text: undefined reference to '_sgeqrf_' Axb.obj .text: undefined reference to '_sorgqr_' Axb.obj .text: undefined reference to '_strtrs_' Axb.obj .text: undefined reference to '_spotrf_' Axb.obj .text: undefined reference to '_spotrs_' Axb.obj .text: undefined reference to '_sgetrf_' Axb.obj .text: undefined reference to '_sgetrs_' Axb.obj .text: undefined reference to '_sgesvd_' Axb.obj .text: undefined reference to '_ssytrf_' Axb.obj .text: undefined reference to '_ssytrs_' lm.obj .text: undefined reference to '__imp___finite' lmblec.obj .text: undefined reference to '___security_cookie' lmblec.obj .text: undefined reference to '@__security_check_cookie@4' lmlec.obj .text: undefined reference to '_sgeqp3_' lmlec.obj .text: undefined reference to '_strtri_' lmlec.obj .text: undefined reference to '_dgeqp3_' lmlec.obj .text: undefined reference to '_dtrtri_' misc.obj .text: undefined reference to '_sgemm_' misc.obj .text: undefined reference to '_spotf2_' misc.obj .text: undefined reference to '_dgemm_' misc.obj .text: undefined reference to '_dpotf2_'

C:\PROGRA~1\MATLAB\R2009B\BIN\MEX.PL: Error: Link of 'levmar.mexw32' failed. ----------------------------------

With Open Watcom I get the following error msg:
----------------------------------
Open Watcom Linker Version 1.8 Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved. Source code is available under the Sybase Open Watcom Public License. See http://www.openwatcom.org/ for details. Error! E3033: directive error near 'C:\LEVMAR-2.5\levmar.lib'

C:\PROGRA~1\MATLAB\R2009B\BIN\MEX.PL: Error: Link of 'levmar.mexw32' failed.

??? Error using ==> mex at 221
Unable to complete successfully.
----------------------------------

Here is my levmar.lib file (Windows7 32-bit, created with MS Visual Studio 10 Express): http://ifile.it/egpjb67/levmar-lib.zip
LEVMAR 2.5: http://www.ics.forth.gr/~lourakis/levmar/levmar-2.5.tgz

This library seems to be correct. Here are the results of lmdemo.exe:
----------------------------------
Covariance of the fit:
0.00483514 -0.00162445 -0.000548114
-0.00162445 0.000546079 0.000184356
-0.000548114 0.000184356 6.22705e-005

Results for Meyer's (reformulated) problem:
Levenberg-Marquardt returned 214 in 214 iter, reason 2
Solution: 2.481778 6.181346 3.502236

Minimization info:
1308.25 8.79459e-005 6.18202e-008 6.25475e-031 1960.95 214 2 281 22 215
----------------------------------

I'm really desperate :( I have tried to create the levmar-MEX-file for 2 days. I need this for an nonlinear least square optimiztaion (with box constraints) in MATLAB. I don't have the optimizitaion toolbox. I have tried LMFnlsq (http://www.mathworks.com/matlabcentral/fileexchange/17534), but this is unconstrained. The second point is the speed, I think that a MEX file will be faster...

I'm really glad for any help.

Regard, PW
.



Relevant Pages

  • Re: "Process terminated by SIGINT"?
    ... Source code is available under the Sybase Open Watcom Public License. ... Create_Partition_ is an undefined reference ...
    (comp.os.os2.programmer.misc)
  • sendmail rays filter installion
    ... i was followed the step to install ray's filter ... howevery when i compiled and type "./build ray-filter".it give me error msg ... "undefined reference to `smfi_getpriv' ...
    (comp.os.linux.networking)
  • Licq installation error
    ... su-2.05b# more distinfo ... there's the error msg ... icqd-chat.o: undefined reference to `pthread_join' ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Using dlls
    ... "If I add it as a source in Open Watcom I get undefined reference errors..." ... He's trying to use the DLL in an OW program. ... Prev by Date: ...
    (comp.os.os2.programmer.misc)