Problem with Visual Studio 2010
Mostra commenti meno recenti
Hello everyone! My Goal is to program a standalone Application that interacts with Matlab.
My System is: * Windows 7 * 64bit * Visual Studio 2010 * MATLAB R2011a
I set in VS the following Parameters:
Configuration Properties > Linker > General > Additional Library Directories to "C:\Program Files\MATLAB\R2011a\extern\lib\win64\microsoft"
Configuration Properties > C/C++ > General > Additional Include Directories to "C:\Program Files\MATLAB\R2011a\extern\include"
an the error that occur is
error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "mxArrayToString" in Funktion "mexFunction".
Or every other Mexelement that i am using ... Any Help is welcome.
1 Commento
Jan
il 8 Set 2011
And did you include mex.h in the code and add all needed libraries found in the lib path?
When does the error occur? Do you run the mex command from within Matlab or do you want to compile the mex from MSVC for any reasons?
Risposta accettata
Più risposte (3)
Michael
il 8 Set 2011
Kaustubha Govind
il 8 Set 2011
You have to define a gateway function with the following prototype:
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]);
In addition, please follow instructions under the section "Compiling MEX-Files with the Microsoft Visual C++ IDE" on this page. And remember to configure your Visual Studio to compile for an x64 target if you have 64-bit MATLAB.
Michael
il 28 Set 2011
0 voti
Categorie
Scopri di più su Call MATLAB from C in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!