c file compile problem

I'm trying to compile fminuit.c, present in this package: http://www.fis.unipr.it/~giuseppe.allodi/Fminuit/fminuit-src.tar.gz
I have selected with 'mex -setup':
Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files (x86)\Microsoft Visual Studio 10.0
as the compiler. When I try to run 'mex fminuit.c' in order to obtain .m and .mexw64 files (I've windows 7 64 bit), I have this errors:
----------------------------
mex fminuit.c
Creating library C:\Users\Marco\AppData\Local\Temp\mex_qPAAfM\templib.x and object C:\Users\Marco\AppData\Local\Temp\mex_qPAAfM\templib.exp
fminuit.obj : error LNK2019: unresolved external symbol mnemat_ referenced in function build_errmat
fminuit.obj : error LNK2019: unresolved external symbol mnerrs_ referenced in function build_errmat
fminuit.obj : error LNK2019: unresolved external symbol doflush referenced in function mexFunction
fminuit.obj : error LNK2019: unresolved external symbol mnintr_ referenced in function mexFunction
fminuit.obj : error LNK2019: unresolved external symbol mnexcm_ referenced in function mexFunction
fminuit.obj : error LNK2019: unresolved external symbol mnparm_ referenced in function mexFunction
fminuit.obj : error LNK2019: unresolved external symbol mnseti_ referenced in function mexFunction
fminuit.obj : error LNK2019: unresolved external symbol mninit_ referenced in function mexFunction
fminuit.mexw64 : fatal error LNK1120: 8 unresolved externals
C:\PROGRA~1\MATLAB\R2011B\BIN\MEX.PL: Error: Link of 'fminuit.mexw64' failed.
Error using mex (line 206) Unable to complete successfully.
------------------------------------
Do you have any suggestion about this problem?
Thanks.
Marco

답변 (2개)

Walter Roberson
Walter Roberson 2012년 1월 22일

0 개 추천

You did not link against the fortran part of the package. See the instructions at http://www.fis.unipr.it/~giuseppe.allodi/Fminuit/Fminuit_building.html

댓글 수: 3

Marco
Marco 2012년 1월 22일
I have seen the page, it suggests to use OpenWatcom to compile Makefile under Windows. But there is no versione available of OpenWatcom for 64 bit OS
Walter Roberson
Walter Roberson 2012년 1월 22일
That doesn't mean you can skip the Makefile step; the Makefile builds pieces and links them together. It just means you have to substitute a different compiler and different flags in the make file.
Marco
Marco 2012년 1월 22일
Yes, you're right. The problem is that I am not very expert and I make mistakes in flags changing. Thanks anyway

댓글을 달려면 로그인하십시오.

Aleksei
Aleksei 2013년 4월 16일

0 개 추천

Marco, I vave the same problem and cannot build fminuit mex file. Could you help me ofc if you found solution? Thanks.

카테고리

도움말 센터File Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

질문:

2012년 1월 22일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by