Azzera filtri
Azzera filtri

Problem with accessing C# dll files

3 visualizzazioni (ultimi 30 giorni)
MaheKK
MaheKK il 4 Nov 2014
Commentato: MaheKK il 4 Nov 2014
->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.

Risposta accettata

Titus Edelhofer
Titus Edelhofer il 4 Nov 2014
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 Commento
MaheKK
MaheKK il 4 Nov 2014
Hi Titus,
Thanks for your information and time, That absolutely works fine :)
Mahesh.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Troubleshooting in MATLAB Compiler SDK in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by