Info

此问题已关闭。 请重新打开它进行编辑或回答。

Compiler Issue on 64 bit system.

1 次查看(过去 30 天)
Amit Kalhapure
Amit Kalhapure 2013-7-19
关闭: MATLAB Answer Bot 2021-8-20
I’ve a 64 bit DELL workstation. When I run a ‘Cpp’ code in matlab(32 bit) using mex command and using ‘Microsoft Visual C++ 6.0’ compiler I get some result. Now if I run the same code in Visual Studio 2010a I'm getting different result. I wonder if 64 bit system is the problem. Earlier I had a patch for VS 2010a, now that patch is removed from Matlab website that's why I use ‘Microsoft Visual C++ 6.0’ compiler.
  2 个评论
Herbert
Herbert 2013-7-19
I've had also a lot of issues with different compilers, in the end the Win SDK compiler solved some of theses issues. Have you already tried this one? http://www.mathworks.de/support/compilers/R2013a/index.html
Friedrich
Friedrich 2013-7-19
For now I would say it sounds like a bug in the C/C++ code w.r.t. to memory handling.

回答(1 个)

Jan
Jan 2013-7-19
编辑:Jan 2013-7-19
32 and 64 bit compilers behave differently when the programmer assume, that e.g. size_t is equal to int or to int32. Using mwSize, mwIndex and mwSignedIndex is a secure way to write platform independent MEX files.
You find a lot of instruction of how to migrate a 32 bit C-program to 64 bit. But this problem does not concern Matlab, but CPP and therefore I suggest asking Google and searching in a CPP forum instead.

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by