kay88
2008-08-11 17:10:06 UTC
I'm trying to create a CIN that requires mex.h header to call Matlab functions. However, whenever I try to compile it, I get LNK2001 errors. I followed the LabVIEW manual on how to compile CINs and I checked my project settings etc. I also included matrix.h and tmwtypes.h header files as required by mex.h. Here is the beginning of my code:#include "C:\Documents and Settings\Desktop\SINE\libsvm-mat-2.82-2\extcode.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include "C:\Documents and Settings\Desktop\SINE\libsvm-mat-2.82-2\svm.h"#include "C:\Documents and Settings\Desktop\SINE\libsvm-mat-2.82-2\mex.h"#include "C:\Documents and Settings\Desktop\SINE\libsvm-mat-2.82-2\svm_model_matlab.h"typedef struct { int32 dimSize; float64 elt[1]; } TD1;typedef TD1 **TD1Hdl;#define CMD_LEN 2048MgErr CINRun(LStrHandle ModelFileName, TD1Hdl Labels, TD1Hdl attributes, TD1Hdl predictedlevel);MgErr CINRun(LStrHandle ModelFileName, TD1Hdl Labels, TD1Hdl attributes, TD1Hdl predictedlevel);Here are the error messages I am receiving:svmpredict2.obj : error LNK2001: unresolved external symbol _mxGetPrsvmpredict2.obj : error LNK2001: unresolved external symbol _mxGetJc_730svmpredict2.obj : error LNK2001: unresolved external symbol _mxGetIr_730svmpredict2.obj : error LNK2001: unresolved external symbol _mxCreateDoubleMatrix_730svmpredict2.obj : error LNK2001: unresolved external symbol _mxDestroyArraysvmpredict2.obj : error LNK2001: unresolved external symbol _mexCallMATLABsvmpredict2.obj : error LNK2001: unresolved external symbol _mxDuplicateArraysvmpredict2.obj : error LNK2001: unresolved external symbol _mxIsSparsesvmpredict2.obj : error LNK2001: unresolved external symbol _mexPrintfsvmpredict2.obj : error LNK2001: unresolved external symbol _mxGetMsvmpredict2.obj : error LNK2001: unresolved external symbol _mxGetNsvmpredict2.obj : error LNK2001: unresolved external symbol _matlab_matrix_to_modelsvmpredict2.obj : error LNK2001: unresolved external symbol _mxGetString_730svmpredict2.obj : error LNK2001: unresolved external symbol _mxIsStructlvsb.lib(lvsbmain.obj) : error LNK2001: unresolved external symbol _gLVExtCodeDispatchTablelvsb.lib(lvsbmain.obj) : error LNK2001: unresolved external symbol _LVSBHeadDebug/predict.dll : fatal error LNK1120: 16 unresolved externalsError executing link.exe.predict.dll - 17 error(s), 0 warning(s)Thanks a lot