[討論] 請問關於轉換mexw32的error問題

看板C_and_CPP作者 (天天都在咪挺了沒)時間13年前 (2011/03/02 21:45), 編輯推噓0(007)
留言7則, 3人參與, 最新討論串1/1
※ [本文轉錄自 MATLAB 看板 #1DRaYa1y ] 作者: hohoww (天天都在咪挺了沒) 看板: MATLAB 標題: [討論] 請問關於轉換mexw32的error問題 時間: Wed Mar 2 21:39:43 2011 Select a compiler: [1] Lcc-win32 C 2.4.1 in D:\PROGRA~1\MATLAB\R2007b\sys\lcc [2] Microsoft Visual C++ 6.0 in C:\Program Files\Microsoft Visual Studio 這兩個是我可以使用的compiler 出現下列錯誤 Error treevalc.c: 112 undeclared identifier `catsplit' Error treevalc.c: 112 operands of = have illegal types `int' and `pointer to void' Error treevalc.c: 114 illegal statement termination Error treevalc.c: 114 skipping `int' Error treevalc.c: 114 undeclared identifier `n' Warning treevalc.c: 114 Statement has no effect code: 以下code 是//110 line ~ 119 line nsplits = mxGetNumberOfElements(prhs[4]); ncatsplit = malloc(sizeof(int) * nsplits); catsplit = malloc(sizeof(double*) * nsplits); int n=0; for (n = 0; n < nsplits; n++) { mxArray* catsplit_cell_mx = mxGetCell(prhs[4], n); if (catsplit_cell_mx == 0) { printf("null cell"); } 請問大家 是哪裡出錯了呢 請益大家 有沒有甚麼解決的辦法 感謝 另外我有個.mexa64 and .mexglx 有沒有甚麼方法可以轉成windows下32-bits使用呢 感謝 -- 如有違版版規請告知,原po將立刻刪除此文。 1K3K5K7K9 K2K4K6K8K 阿~ ※ 發信站: 批踢踢實業坊(ptt.cc) ※ 編輯: hohoww 來自: 114.32.196.237 (03/02 21:45)

03/02 22:09, , 1F
看看ncatsplit跟catsplit 之前的程式碼有哪邊不同...
03/02 22:09, 1F

03/02 22:10, , 2F
為什麼一個報錯另一個沒有
03/02 22:10, 2F

03/03 00:30, , 3F
沒有不一樣耶..都是在前面宣告變數。 Y
03/03 00:30, 3F

03/03 01:23, , 4F
第二個問題似乎是沒有辦法的 感謝
03/03 01:23, 4F

03/03 01:25, , 5F
catsplit 可能有打錯...而且你這個程式在vc跑過一次
03/03 01:25, 5F

03/03 01:25, , 6F
再轉mexw32,會比較好除去error
03/03 01:25, 6F

03/03 22:25, , 7F
,不管怎樣 謝謝樓上幾位的寶貴經驗
03/03 22:25, 7F
文章代碼(AID): #1DRadV8J (C_and_CPP)