drogonframework / drogonframework/drogon

Does not build as shared library

Open
#1,845 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.