Error detected from emxArray_uint8_T: .text+0xc1): undefined reference to `emxInit_uint8_T1(emxArray_uint8_T**, int)'?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
write a matlab function that calculates entropy of gray scale image:
"score=score_entropy(image)" then use matlab coder to convert it to c++
c++ code:
#include "mex.h"
#include "math.h"
#include "score_entropy.cpp"
#include"score_entropy_emxAPI.cpp"
#include "score_entropy_initialize.h"
class image
{
public:
unsigned char *im;
int h1,w1;
voide scoreimage();
}
void image::scoreimage( )
{score_entropy_initialize();
emxArray_uint8_T* I=emxCreateWrapper_uint8_T(im,h1,w1);
double ent=score_entropy(I);
emxDestroyArray_uint8_T(I);
}
void mexFunction( int nl, mxArray *pl[], int nr, const mxArray *pr[] )
{
image.im = ( unsigned char*) mxGetData(pr[0]);
image. h1 = (int) imgSize[0];
image. w1 = (int) imgSize[1];
image.scoreimage();
}
The definition of score_entropy.cpp :
double score_entropy( const emxArray_uint8_T *im)
I found a list of errors :
(.text+0xc1): undefined reference to `emxInit_uint8_T1(emxArray_uint8_T**, int)'
(.text+0xfb): undefined reference to `emxEnsureCapacity_uint8_T(emxArray_uint8_T*, int)'
(.text+0x16c):undefined reference to `emxInit_uint8_T(emxArray_uint8_T**, int)'
..
..
(.rdata$.refptr.rtMinusInf[.refptr.rtMinusInf]+0x0):
undefined reference to `rtMinusInf'
collect2.exe: error: ld returned 1 exit status
can any one help to correct this code?
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur MATLAB Coder dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!