开发者

Cplex linking Error in Mex Command from Matlab

I am trying to run mixed integer quadratic programming by calling Cplex (122version) from Matlab using Mex function. When I try in matlab : mex miqp_cplex.c, following type errors oc开发者_如何学JAVAcurred.

Creating library C:\Users\maskamal\AppData\Local\Temp\mex_3XVWAG\templib.x and object C:\Users\maskamal\AppData\Local\Temp\mex_3XVWAG\templib.exp miqp_cplex.obj : error LNK2019: unresolved external symbol __imp_CPXcloseCPLEX referenced in function miqp miqp_cplex.obj : error LNK2019: unresolved external symbol __imp_CPXfreeprob referenced in function miqp miqp_cplex.obj : error LNK2019: unresolved external symbol __imp_CPXgetmipitcnt referenced in function miqp miqp_cplex.mexw64 : fatal error LNK1120: 21 unresolved externals

C:\PROGRA~1\MATLAB\R2011A\BIN\MEX.PL: Error: Link of 'miqp_cplex.mexw64' failed.

Since it fail to locate "ilcplex\cplex.h", I add full path

include "C:\ILOG\CPLEX_Studio_AcademicResearch122\cplex\include\ilcplex\cplex.h" and I guess problem is related to cplex.h and linking with library.

Any hints to solve my problem are welcomed.


I could solve it partly. I could compile by adding the path of library with mex command. However, when I run the mex file: miqp_cplex it says: Invalid MEX-file 'C:\Users\maskamal\Documents\MATLAB\MexCplex80\miqp_cplex.mexw64': 指定されたモジュールが見つかりません。(translation from japanese: indicated module is not found)

My Matlab R2011a and Cplex122

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜