Skip to content

MSVC Win32 - Build fails when enable "POCO_ENABLE_STD_MUTEX" #5311

Description

@Spaky

Describe the bug
Windows build of Poco fails when enable "POCO_ENABLE_STD_MUTEX" to use std::mutex etc.
It tries to include the Linux header "sys/select.h"

To Reproduce
Build Poco for Windows with MSVC and enable "POCO_ENABLE_STD_MUTEX"

Expected behavior
Poco supports "POCO_ENABLE_STD_MUTEX" on Windows platforms when build with MSVC.

Logs
[ 60%] Building CXX object Foundation/CMakeFiles/Foundation.dir/src/Mutex.cpp.obj Mutex.cpp D:\temp\poco-poco-1.15.1-release\Foundation\src\Mutex_STD.cpp(18): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "sys/select.h": No such file or directory NMAKE : fatal error U1077: ""C:\Program Files\CMake\bin\cmake.exe" -E cmake_cl_compile_depends --dep-file=CMakeFiles\Foundation.dir\src\Mutex.cpp.obj.d --working-dir=D:\temp\poco\Foundation --filter-prefix="Hinweis: Einlesen der Datei: " -- C:\PROGRA~1\MICROS~1\2022\PROFES~1\VC\Tools\MSVC\1444~1.352\bin\Hostx86\x86\cl.exe @C:\Users\user\AppData\Local\Temp\nm7D29.tmp": Rückgabe-Code "0x2" Stop. NMAKE : fatal error U1077: ""C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.44.35207\bin\HostX86\x86\nmake.exe" -s -f Foundation\CMakeFiles\Foundation.dir\build.make /nologo -SL Foundation\CMakeFiles\Foundation.dir\build": Rückgabe-Code "0x2" Stop. NMAKE : fatal error U1077: ""C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.44.35207\bin\HostX86\x86\nmake.exe" -s -f CMakeFiles\Makefile2 /nologo -LS all": Rückgabe-Code "0x2" Stop.

Screenshots
If applicable, add screenshots to help explain your problem.

Please add relevant environment information:

  • Windows 11
  • Poco 1.15.1
  • MS VS2022

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions