0

I have a C++ Visual Studio 2010 project, which I can run in x64 mode. But I want to run it in x32 also.. So here I have a problem - this project uses a Matlab API, which I never met before. I have these errors:

1>ReadMatrix.obj : error LNK2001: unresolved external symbol _matOpen
1>ReadMatrix.obj : error LNK2001: unresolved external symbol _matGetVariable
1>ReadMatrix.obj : error LNK2001: unresolved external symbol _mxGetDimensions_730
1>ReadMatrix.obj : error LNK2001: unresolved external symbol _mxGetPr
1>ReadMatrix.obj : error LNK2001: unresolved external symbol _mxDestroyArray
1>ReadMatrix.obj : error LNK2001: unresolved external symbol _matClose

I looked in the Matlab folder(2011a) on the path ..\MATLAB\R2011a\extern\include, but found there only x64 files. What I should do?

Il'ya Zhenin
  • 1,272
  • 2
  • 20
  • 31

1 Answers1

2

You'll have to get hands on the 32bit libraries from a corresponding 32bit Matlab installation.

One possible simplification: For compilation (not running) only, you do not necessarily need a full 32bit MATLAB installation, but only the library files (libmat, libmx, libmex). This might simplify things if you'd e.g. like to compile the 32bit version for a colleague etc.

sebastian
  • 9,526
  • 26
  • 54
  • 1
    The MCR installer might even have these files. There is a lot of extraneous stuff in the MCR installation folder that goes beyond just a runtime environment. It's worth a look. – chappjc Dec 12 '13 at 09:34