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 occurred.
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.