libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -c mat.c -DDLL_EXPORT -DPIC -o .libs/mat.o
mat.c: In function `Mat_VarReadInfo':
mat.c:1710: warning: dereferencing `void *' pointer
mat.c:1710: error: request for member `_flags' in something not a structure or union
mat.c: In function `Mat_VarReadNext':
mat.c:1762: warning: dereferencing `void *' pointer
mat.c:1762: error: request for member `_flags' in something not a structure or union
Makefile:419: recipe for target `mat.lo' failed
I'm trying to look around and see if I can figure the problem out,
and any help is much appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-11-17
Version matio-1.3.4 actually compiles and produces a static library, but matio-1.5.0 fails with the above error :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Got the same message, turned to be the gcc 4x being very particular about mat->fp where fp is a void * pointer but actually feof etc thinks it is a FILE * structure.
fixed by casting (FILE *) mat->fp everywhere in that file…
hope that helps.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The configuration summary is ok:
MATIO Configuration Summary
C Compiler: gcc
CFLAGS: -g -O2
Shared Libraries: yes
Static Libraries: yes
default MAT version: MAT_FT_MAT5
Features -----------------------------
MAT v7.3 file support: no
Packages -----------------------------
zlib:
hdf5:
MATLAB: /cygdrive/c/Program Files/MATLAB/R2012b/bin/matlab
But make fails:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -c mat.c -DDLL_EXPORT -DPIC -o .libs/mat.o
mat.c: In function `Mat_VarReadInfo':
mat.c:1710: warning: dereferencing `void *' pointer
mat.c:1710: error: request for member `_flags' in something not a structure or union
mat.c: In function `Mat_VarReadNext':
mat.c:1762: warning: dereferencing `void *' pointer
mat.c:1762: error: request for member `_flags' in something not a structure or union
Makefile:419: recipe for target `mat.lo' failed
I'm trying to look around and see if I can figure the problem out,
and any help is much appreciated.
Version matio-1.3.4 actually compiles and produces a static library, but matio-1.5.0 fails with the above error :(
Can you post the code around the mentioned lines? I don't see anything that has _flags in it. The only data structure with _flags is matio_flags.
Chris
Got the same message, turned to be the gcc 4x being very particular about mat->fp where fp is a void * pointer but actually feof etc thinks it is a FILE * structure.
fixed by casting (FILE *) mat->fp everywhere in that file…
hope that helps.
Thanks, filterbank10210 this solution worked very well.