Bug 8419 - std::thread not available in Windows builds
Summary: std::thread not available in Windows builds
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Build system (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: MediumPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-02 12:49 CEST by Pierre Ossman
Modified: 2024-09-03 13:14 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2024-09-02 12:49:41 CEST
If you try to use the thread (or mutex) abstraction in C++11 for our Windows builds, you just get this error:

> foo.h:104:12: error: 'thread' in namespace 'std' does not name a type
>        std::thread* thread;
>             ^

So it seems the headers are present, but no actual declarations.

Presently we don't have anything that requires this, but we could easily import some project that does in the future.
Comment 1 Pierre Ossman cendio 2024-09-02 12:51:28 CEST
The issue seems to be that gcc historically was written for pthreads. So to get std::thread on friends for MinGW, you need to enable MinGW's pthreads emulation (which we currently don't).

However, gcc 13 has removed this limitation and should work with native Win32 APIs.

Note You need to log in before you can comment on or make changes to this bug.