在 2022/10/12 02:37, [email protected] 写道:
Build it with: meson setup builddir --cross-file cross_file_mingw64.txt ninja -C builddir/ And it fails with:
That's because you compiled it as C. I used g++ to compile these, and there was no such error.For C, this inline issue is going to be much more messy due to lack of COMDAT support about `inline`. Your will need a dedicated macro for each translation unit. A dirty solution looks like this:
```
#ifndef INSIDE_FOO_C
__attribute__((__dllexport__)) inline
#endif
extern
int
g_strcmp0(const char*str1, const char*str2)
...
```
and in 'foo.c':
```
#define INSIDE_FOO_C 1
#include "foo.h"
extern int g_strcmp0 (const char *str1, const char *str2);
```
Further reading:
https://github.com/lhmouse/mcfgthread/wiki/Differences-between-GNU,-C99-and-C---%60inline%60
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
