1

I have a 64-bit DLL compiled from Visual Studio 2010 coded like this example: visual studio Dll and Matlab

When I call loadlibrary in Matlab (64-bit), I get the following error message:

Error using loadlibrary (line 254)
A 'Selected' compiler was not found.  You may need to run mex
-setup.

Any suggestions?

Community
  • 1
  • 1
steveo225
  • 11,394
  • 16
  • 62
  • 114

1 Answers1

0

As the error message states, you must specify which compiler was used to generate your library. Use mex -setup to do this.

I think Matlab needs to know which compiler was used to generate the library because the ABI is compiler-dependent for C++... Although I see in the other answer that they use extern "C" to export the functions, which should make them compliant with the C ABI, which is more or less standard on x86_64 Windows, so I'm not quite sure about this...

reverse_engineer
  • 4,239
  • 4
  • 18
  • 27