Creating a shared library from MATLAB
Afficher commentaires plus anciens
Hello, I am trying to create a shared library using the MATLAB compiler, to be accessed with my C++ code in Visual 2010 C++. MATLAB created the library but when I try and access is from VC++ I get the errors below. Not sure why it is happening. I am pretty sure I linked to everything properly. Any help would be appreciated. thanks!
Errors: error LNK2028: unresolved token (0A000662) "extern "C" ... and error LNK2019: unresolved external symbol "extern "C"
1 commentaire
Kaustubha Govind
le 31 Jan 2012
Which function is the error about? (There typically is a function name listed after the "extern "C"" part. It looks like you did not add required library dependencies to the Linker options.
Réponses (2)
Walter Roberson
le 30 Jan 2012
That suggests to me that you attempted to compile C++ code with a C compiler.
Please uses
mex -setup
and in particular ensure that you are not using lcc (which is C only.)
Robert
le 30 Jan 2012
0 votes
Catégories
En savoir plus sur MATLAB Compiler dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!