DSPRelated.com
Forums

problem with 'mex'

Started by Zahra A Shah July 4, 2006
hi,
i am trying to use a free toolbox which implements Support vector machines in MATLAB. Now i have to use this toolbox and cannot use some other toolbox due to some constraints. The problem which i am having is that, this toolbox is using some C/C++ files (for efficiency). The toolbox has very little documentation and only says that use 'mex' to compile the C/C++ files on your machine. When i compile these files (using the following syntax)

>> mex D:\svm\svm_v0.55\@smosvctutor\smosvctrain.cpp

i get the following error:

Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

smosvctrain.obj mexversion.res
Creating library _lib6101.x and object _lib6101.exp
smosvctrain.obj : error LNK2001: unresolved external symbol "public: struct mxArray_tag * __thiscall SmoTutor::train(void)" (?train@SmoTutor@@QAEPAUmxArray_tag@@XZ)
smosvctrain.obj : error LNK2001: unresolved external symbol "public: __thiscall SmoTutor::SmoTutor(struct mxArray_tag *,struct mxArray_tag *,struct mxArray_tag *,struct mxArray_tag *,struct mxArray_tag *,struct mxArray_tag *,struct mxArray_tag *,class Cache *)" (??0SmoTutor@@QAE@PAUmxArray_tag@@000000PAVCache@@@Z)
smosvctrain.obj : error LNK2001: unresolved external symbol "public: __thiscall LrrCache::LrrCache(struct mxArray_tag *,struct mxArray_tag *)" (??0LrrCache@@QAE@PAUmxArray_tag@@0@Z)
smosvctrain.dll : fatal error LNK1120: 3 unresolved externals

C:\MATLAB6P1\BIN\WIN32\MEX.PL: Error: Link of 'smosvctrain.dll' failed.

??? Error using ==> mex
Unable to complete successfully

Can anyone please tell me where i am going wrong as i dont have any prior experience in making dll's in MATLAB using C/C++ code.

Thankyou,

Zahra Shah

Zahra Atiq Shah