I am trying to read mat-files in C++ in a Qt project. At morning I had next problem: Read Mat Files in C++ in a Qt project, and it is solved already. But now I am having problems with the next issue:
matrix.h:267: error: C2146: syntasis error :';'is missing before 'mxChar'
c4430 missing type specifier - int assumed. note c++ does not support default-int
In my project.pro I am telling it:
QMAKE_CXXFLAGS += -EHsc -std=c++11 -Zc:wchar_t
QMAKE_LFLAGS += -std=c++11
In the tmwtypes.h where types are defined:
/** UTF-16 character type */
#if (defined(__cplusplus) && (__cplusplus >= 201103L)) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
typedef UINT16_T CHAR16_T;
#define U16_STRING_LITERAL_PREFIX u
#elif defined(_MSC_VER)
typedef wchar_t CHAR16_T;
#define U16_STRING_LITERAL_PREFIX L
#else
typedef UINT16_T CHAR16_T;
#endif
#endif /* __TMWTYPES__ */
#endif /* tmwtypes_h */
In the matrix.h:
/*
* Logical type
*/
typedef bool mxLogical;
/*
* Typedef required for Unicode support in MATLAB
*/
typedef CHAR16_T mxChar;
Thanks in advance,and sorry if it is a amateur question.