reading mat file in vc++ program

Hi,
I wanna to read a .mat file in a simple vc++ program:


#include "stdafx.h"
#include "mat.h"
#pragma comment(lib, "libmat.lib")
#pragma comment(lib, "libmx.lib")

int main(int argc, char* argv[])
{
MATFile *pmat;

pmat = matOpen("dist.mat", "r");

if (pmat == NULL)
{
printf("Error Opening File: \"%s\"\n", argv[1]);
return 0;
}

return 0;
}

I have set the lib and header files carefully. There is a runtime error:
"The procedure entry point ExitProcess could not be located in the dynamic link library libmat.dll"
Would you please tell me what is the problem?
Thanx
It sounds like "ExitProcess" isn't setup right in that dll. If you tell me where I can find a trustworthy copy of this DLL I can do a quick analysis on it.
Maybe there is a problem with different runtimes/configuration linked in.
@ Computergeek01
MATLAB has been installed it automatically. How can I send the file for you?

@ modoran
How can I check iy?
Topic archived. No new replies allowed.