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
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
2012 年 1 月 22 日
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
2012 年 1 月 22 日
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) についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!