error LNK2019: unresolved external symbol although included

1 Ansicht (letzte 30 Tage)
Ingo Hermann
Ingo Hermann am 9 Nov. 2017
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

Antworten (0)

Kategorien

Mehr zu Write C Functions Callable from MATLAB (MEX Files) finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by