在 2020/4/30 16:43, Pali Rohár 写道: > > I think there is another problem: > > Function wcstof() which is in mingw-w64-headers/crt/stdlib.h should be > marked as "inline". Otherwise there could be link problems... > > And after that above redefinition error should not be triggered as C99 > allows you to have one inline and one non-inline definition of the same > function. > > And I think after adding "inline" for function definition in header > file, patch which Liu Hao posted should not be needed. >
See the macro definition in `_mingw_mac.h`. In the C case `__mingw_ovr` expands to `static inline` which is different from plain `inline`. And even in C99, you cannot have two function bodies in the same translation unit. The following code provides two definitions but the external one can't have a function body: ```c // C99 only inline int xadd(int x, int y) // inline definition { return x + y; } extern inline int xadd(int x, int y); // external definition ``` -- Best regards, LH_Mouse
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public