Problem with accessing C# dll files

조회 수: 4 (최근 30일)
MaheKK
MaheKK 2014년 11월 4일
댓글: MaheKK 2014년 11월 4일
->I have a C# Dll file named ACE.dll,copied dll file to Matlab working directory(current folder),and i am using loadlibrary('ACE.dll'); syntax for loading libraries,there are no .h header file so i made my syntax loadlibrary('ACE.dll'); but i am getting an error stating
"Error using loadlibrary (line 254) A 'Selected' compiler was not found. You may need to run mex -setup.
Error in ImportDll (line 3) loadlibrary(fullpathToDll);"
->After running mex -setup, i have said 'y' to locate installed compilers,but got an error
"No supported SDK or compiler was found on this computer. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2012b/win64.html
Error using mex (line 206) Unable to complete successfully."
->Both Dll and Matlab are with 64 bit only, I have installed VS Express 2013 for desktop. checked SDK version and having v7.1A and above until v8.1A.
What could be the reason? how can i access dll files? please help.

채택된 답변

Titus Edelhofer
Titus Edelhofer 2014년 11월 4일
Hi,
if you have a C# dll I guess it's not a usual Windows dll but a .NET assembly? In this case you would need to use
NET.addAssembly
instead of loadlibrary to import the dll to MATLAB.
Titus
  댓글 수: 1
MaheKK
MaheKK 2014년 11월 4일
Hi Titus,
Thanks for your information and time, That absolutely works fine :)
Mahesh.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Troubleshooting in MATLAB Compiler SDK에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by