tbeu / matio

MATLAB MAT File I/O Library
https://matio.sourceforge.io
BSD 2-Clause "Simplified" License
338 stars 97 forks source link

cannot compile successfully on Windows #230

Closed jilianying closed 9 months ago

jilianying commented 9 months ago

Conditions: 1、windows10, msvc 2022, llvm 17(16), HDF5、zlib 2、cargo add matio-rs, cargo build --release

Error: 1、Ident not valid

Reason 1、in matio.h, there is a anonymous enum in line 160, which cause this.

Action 1、I changed llvm version, bindgen version,does not work 2、I mannually changed the enum into named one, works。

the related code is :

/** @brief matio lookup type
 *
 * @ingroup MAT
 * matio lookup type
 */
enum 
{
    MAT_BY_NAME = 1, /**< Lookup by name */
    MAT_BY_INDEX = 2 /**< Lookup by index */
};

new

tbeu commented 9 months ago

Resolved by https://github.com/tbeu/matio/commit/6b0c1f47430dcaec05eb7ac03e63d02f6e5bc009.