Using the 32-bit matlab api with a 64-bit installation

Hi all,
I am currently building a 32-bit MatLab application in c++ using the MatLab library. It has to be compiled to 32 bit since some of the other libraries I use are only available in 32-bit. However, my current MatLab installation is 32-bit. I do have the 32-bit libs and dll's, and I was able setup Visual Studio to use those, so the application can be compiled without errors, and the application is launched correctly. I can start the matlab engine from my program, however the 64-bit matlab.exe executable is launched instead of the 32-bit one. As a result my program crashes the second I do anything with the engine. Is it possible to force the 32-bit executable to be used instead of the 64-bit one?
Side node: I also noticed that when I start the 32-bit executable manually I get an error that the jvm can't be started because the classpath can't be found.

Antworten (1)

Kaustubha Govind
Kaustubha Govind am 12 Dez. 2011
It seems likely that your 64-bit MATLAB is registered as a COM server, but your 32-bit installation isn't. You could try manually registering your 32-bit installation as a COM server and see if that will override the 64-bit installation.
matlab /regserver

Kategorien

Gefragt:

am 12 Dez. 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by