drogonframework / drogonframework/drogon
drogon project fail to build with mingw
- Dominant language
- C++
- Stars
- 14.3k
- Forks
- 1.4k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 15
Description
**Describe the bug**
drogon项目使用mysys2编译失败。操作步骤如下:
```
pacman -S mingw-w64-i686-gcc mingw-w64-i686-cmake make mingw-w64-i686-c-ares mingw-w64-i686-jsoncpp
git clone https://github.com/drogonframework/drogon --recursive
mkdir drogon/build
cd drogon/build
cmake .. -G "MSYS Makefiles"
make -j
```
错误提示如下:
```
$ make -j
C:/dev/drogon/trantor/trantor/net/EventLoop.cc:31:7: error: conflicting declaration 'using ssize_t = long long int'
31 | using ssize_t = long long;
| ^~~~~~~
In file included from D:/Program Files/msys64/mingw32/include/crtdefs.h:10,
from D:/Program Files/msys64/mingw32/include/stdint.h:28,
from D:/Program Files/msys64/mingw32/lib/gcc/i686-w64-mingw32/12.2.0/include/stdint.h:9,
from C:/dev/drogon/trantor/trantor/utils/Date.h:18,
from C:/dev/drogon/trantor/trantor/net/EventLoop.h:20,
from C:/dev/drogon/trantor/trantor/net/EventLoop.cc:18:
D:/Program Files/msys64/mingw32/include/corecrt.h:47:13: note: previous declaration as 'typedef int ssize_t'
47 | typedef int ssize_t;
| ^~~~~~~
make[2]: *** [trantor/CMakeFiles/trantor.dir/build.make:202: trantor/CMakeFiles/trantor.dir/trantor/net/EventLoop.cc.obj] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:182: trantor/CMakeFiles/trantor.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
```
直接用MinGW makefile 也报了同样的错误
Contributor guide
Assessment
This issue has not been assessed yet.