Click here to Skip to main content
15,899,314 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to load mat files from MATLAB to C++ code with the use of matlab C-code.

I am using MATLAB 2010a and the c-file given by MATLAB comand:
edit([matlabroot '/extern/examples/eng_mat/matdgns.c']);


I linked the libraries in VS 2010b1 via Project->>Properties->>VC++Directories.
I have problems with running mat.h functions. I get this kind of errors:
error LNK2019: unresolved external symbol _matGetNextVariable referenced in function "int __cdecl diagnose(char const *)" (?diagnose@@YAHPBD@Z)
1>
Posted
Updated 30-Sep-10 1:14am
v2
Comments
Henry Minute 30-Sep-10 6:49am    
Have you tried asking this on the Matlab site? It seems sensible to me that people over there would know far more about it.

Try looking something similar here[^]. If you don't find, you can ask this question there.
It would be quicker and people out there might be better for such question.
 
Share this answer
 
I think your problem is more likely to do with lib format.

If you open your matlab lib in notepad the search for ?diagnose@@YAHPBD@Z
If it finds it your library is compatable. If it is not compatable your may have to run a conversion on the lib file to make a version the VC++ understands.

this may help

http://www.mathworks.com/support/solutions/en/data/1-2Q3TJ5/?solution=1-2Q3TJ5
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900