Error calling a DLL from MSVS C++ 2010
古いコメントを表示
So I was able to create the .dll file in MATLAB 2013b with
mcc -B csharedlib:libmatrix solution.m
and had no problem calling this .dll file from Visual Studio C++ 2010.
However, since I re-compiled this same .dll in MATLAB 2014a with the exact same command, I got "Error using internal.optim.getNNZcounts" (see image below) when I called this .dll from my Visual Studio C++ 2010 project.

I am not sure what could have caused this error, as it worked totally fine when I compiled it with MATLAB 2013b which I no longer have a licence anymore. Any help or input would be appreciated.
Here are the codes for "solution.m" MATLAB file I used to compile the .dll with:
function [X,D] = solution(i,j,s,info,Y,LB,UB)
S = sparse(i,j,s,info(1),info(2),info(3));
X=quadprog(2*S'*S, -2*S'*Y,[],[],[],[],LB,UB,[],options);
D=S*X-Y;
5 件のコメント
Geoff Hayes
2014 年 11 月 3 日
Paul - does the file getNNXcounts.mexw64 exist in the specified folder? If so, was it compiled with 2013b or 2014a?
Paul
2014 年 11 月 4 日
Geoff Hayes
2014 年 11 月 4 日
It could be, though I'm not sure how you would force a recompile of that file only. (I don't have the mcc app.) You could just move the file to another directory and try the build again and see if R2014a creates it. Though maybe this would have to be done for other files to. Is there any way for you to find out if this file was built with 2013b? Is the file creation and/or modified date recent (since your MATLAB upgrade)?
Paul
2014 年 11 月 4 日
Geoff Hayes
2014 年 11 月 4 日
Or, it could be that this file, getNNXcounts.mexw64, is part of the MATLAB toolbox that came with R2014a.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!