I like to save typing so i created a dll with revised definitions...1 so far successful;
I redefined CV_MAT_TYPE ok it just accepts and returns an int but trying to redefine CV_MAT_ELEM i get a few errors:
test.h:56:1: warning: parameter names (without types) in function declaration [enabled by default] test.c: In function ‘ELEM’: test.c:65:12: error: expected expression before ‘)’ token test.c:65:12: error: request for member ‘data’ in something not a structure or union test.c:65:12: error: request for member ‘step’ in something not a structure or union test.c:66:1: warning: control reaches end of non-void function [-Wreturn-type]
i use the same make file all the time and its aces but here is the contents of my .c :
CvMat* ELEM(mat, elemtype, row, col) { return CV_MAT_ELEM(mat, elemtype, row, col); }
and the contents of my .h
/* #define CV_MAT_ELEM( mat, elemtype, row, col ) \ ((elemtype)CV_MAT_ELEM_PTR_FAST( mat, row, col, sizeof(elemtype))) / CvMat ELEM(mat, elemtype, row, col);
i tried adding a CvMat and CvMat* return but got all the same errors ....added return values like so
CvMat* ELEM(CvMat mat, int elemtype, int row, int col)
and only get this error(and above warning)
65:12: error: expected expression before ‘)’ token
how do i get past this....still new to redefining macros in c