Unable initialize the Matlab dll in c++ -
i'm using windows 7 x64 matlab r2012b x32 , vs2010.
i want call matlab function named add
in c++. convert add.m
dll using mcc
command, , add project. have got error after tried initialize dll.
int _tmain(int argc, _tchar* argv[]) { if(!addinitialize()) cout<<"addinitialize fail!!!"<<endl; return 0; }
the output info:
first-chance exception @ 0x74c6c42d in matlabtest.exe: microsoft c++ exception: mathworks::mcli18nutil::deployedexception @ memory location 0x0029eff0.. thread 'win32 thread' (0xc04) has exited code 0 (0x0). program '[1100] matlabtest.exe: native' has exited code 0 (0x0).
because ran mcc
command -c
option, need add add.ctf
file path dll stored before initializing dll.
i can run mcc
command again without -c
option generate new dll. , use new dll instead of old 1 solve problem.
Comments
Post a Comment