error LNK2019: unresolved external symbol although included

1 次查看(过去 30 天)
I have a problem with using mex. When I use the command
mex mexT1Mapping.c
I get this error
Error using mex
Creating library mexUtils.lib and object mexUtils.exp
mexT1Mapping.obj : error LNK2019: unresolved external symbol maxAbsArray referenced in function threadFunc
and this although I included in the mexT1Mapping.c function the function mexUtils.h with
#include "mexUtils.h";
So _maxAbsArray_ is included but mex does not find it. How can I solve it?
which has following code:
#ifndef MEXUTILS_H
#define MEXUTILS_H
int signDouble (double x);
int by_size (const void * a, const void * b);
double maxAbsArray(double *x, int n);
double minAbsArray(double *x, int n);
double l2Array (double *x, double *y, int n);
double mean (double *x, int n);
double covar (double *x, double *y, int n);
double corrcoef (double *x, double *y, int n);
double mins (double a, double b);
double maxs (double a, double b);
#endif

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Write C Functions Callable from MATLAB (MEX Files) 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by