drogonframework / drogonframework/drogon
Does not build as shared library
- Dominant language
- C++
- Stars
- 14.3k
- Forks
- 1.4k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 14
Description
**Describe the bug**
Drogon does not build shared library because of using `thread_local` in `lib/src/Utilities.cc`.
**To Reproduce**
Build drogon with `-DBUILD_SHARED_LIBS:BOOL=ON`
**Expected behavior**
Successful build.
**Desktop (please complete the following information):**
- OS: Windows 11
- MSYS2 CLANG64
**Additional context**
Errors produced:
```
xxx/drogon/lib/src/Utilities.cc:1235:46: error: 'hash' cannot be thread local when declared 'dllexport'
1235 | thread_local trantor::utils::Hash256 hash;
| ^
xxx/drogon/lib/src/Utilities.cc:1236:29: error: 'i' cannot be thread local when declared 'dllexport'
1236 | thread_local size_t i = 0;
```
Contributor guide
Assessment
This issue has not been assessed yet.