c++cmakepocomingw-w64

POCO C++ library is not compiling with CMAke and MinGW. Thread_WIN32.cpp __except error


everyone. I try to build POCO C++ library with CMake and MinGW compiler, but I receive syntax error in POCO Thread_WIN32.cpp file (Picrealted). I think it is somehow related with compiler exact version, posix-sjlj. Has anyone encountered this problem?

Setup:

error pic (link)

UPDATE 1

I tried another version of MinGW-w64 (MinGW-W64 x86_64-posix-seh-rev0 8.1.0), but it also didn't work. I have another question: maybe compiler just makes it's job right? In Thread_WIN32.cpp file from POCO GitHub in setThreadName function no __catch before __except. Why? Mustn't it be there?

pic of setThreadName function from POCO GitHub

UPDATE 2 Okay, after __try shoudn't be __catch, after __try follows __except and that's all. This is microsoft own way to handle errors - SEH. But I wonder hard is there some way to properly use MinGW-w64 compiler with SEH. I read about __try1 and __except1 in MinGW, but Internet said that it might be unsafe and very painful


Solution

  • So, I tried some different variations of MinGW-w64 compiler, but it didn't work. I decided to download MSVC compiler with Microsoft Build Tools and it did pretty well, all libraries compiled