.mex32/.mex64 ファイルのデバッグに関する質問があります。test.cpp という名前のファイルがあるとします。
#include "mex.h"
#include <iostream>
void mexFunction(int nlhs, mxArray *plhs[],
int nrhs, const mxArray *prhs[])
{
mexPrintf("Hello Matlab, and this is a test program\n");
}
次に、Visual Studio 2010 でコンパイルしてビルドtest.mex64
します。次に、matlab で次のスクリプトを記述して関数をテストします。
clc;
test;
test.mex64 関数をデバッグしたいとします。どうすればよいでしょうか? は次の手順を採用しましたが、失敗しました。
mexPrintf
VS2010 では、行頭でブレークポイントをトグルします。- VS2010 では、Debug->Attach to Process... から MATLAB.exe を選択します。
- MATLAB スクリプトを実行する
clc; test;
私が得たエラーメッセージは次のとおりです。
The breakpoint will not currently be hit. No symbols have been loaded for this document.