Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Matlab Mex linking problems

$
0
0
Hello,

I've just started using MEX to execute C functions in matlab, but I am facing some linking issues.

This is the example I used to see if the linking process is working:

#include <mex.h>
#include <pmdsdk2.h>

char err[128];

void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
  pmdGetLastError (0, err, 128);
}

The pmdGetLastError belongs to pdmsdk2.h

And this is the mex command I am using:

>> mex -ID:/TransientPMD/CaptureTool/include D:/TransientPMD/CaptureTool/test.cpp D:/TransientPMD/CaptureTool/lib/pmdaccess2.lib

Error: test.obj : error LNK2019: unresolved external symbol __imp_pmdGetLastError referenced in function mexFunction

Viewing all articles
Browse latest Browse all 19628

Trending Articles