错误:sigjmp_buf未命名类型。在使用Poco C+编译我的项目时+;图书馆 我在Wix1010x8664上工作了一个C++项目。 我使用的是使用MyS2的MyW64编译器安装的POCO C++库。 使用Msys2成功安装了我的所有项目依赖项

错误:sigjmp_buf未命名类型。在使用Poco C+编译我的项目时+;图书馆 我在Wix1010x8664上工作了一个C++项目。 我使用的是使用MyS2的MyW64编译器安装的POCO C++库。 使用Msys2成功安装了我的所有项目依赖项,c++,compiler-errors,mingw-w64,poco-libraries,msys2,C++,Compiler Errors,Mingw W64,Poco Libraries,Msys2,然而,当我试图编译我的项目时,我遇到了下一个错误: In file included from /mingw64/include/Poco/Thread_POSIX.h:23, from /mingw64/include/Poco/Thread.h:35, from /mingw64/include/Poco/ThreadPool.h:22, from /mingw64/include/Poco/ActiveStart

然而,当我试图编译我的项目时,我遇到了下一个错误:

In file included from /mingw64/include/Poco/Thread_POSIX.h:23,
             from /mingw64/include/Poco/Thread.h:35,
             from /mingw64/include/Poco/ThreadPool.h:22,
             from /mingw64/include/Poco/ActiveStarter.h:22,
             from /mingw64/include/Poco/ActiveMethod.h:24,
             from /mingw64/include/Poco/AbstractEvent.h:25,
             from /mingw64/include/Poco/BasicEvent.h:21,
             from /mingw64/include/Poco/Util/AbstractConfiguration.h:25,
             from /mingw64/include/Poco/Util/LoggingConfigurator.h:24,
             from ../../prompt/common/PLogger.h:41,
             from PLogger.cpp:15:
/mingw64/include/Poco/SignalHandler.h:80:2: error: 'sigjmp_buf' does not name a type; did you mean 'jmp_buf'?
   80 |  sigjmp_buf& jumpBuffer();
      |  ^~~~~~~~~~
      |  jmp_buf
/mingw64/include/Poco/SignalHandler.h:99:3: error: 'sigjmp_buf' does not name a type; did you mean 'jmp_buf'?
   99 |   sigjmp_buf buf;
      |   ^~~~~~~~~~
      |   jmp_buf
在查看SignalHandler.h之后,我看到该文件包括:

#include <setjmp.h>
#include <machine/setjmp.h>
我包括:

-Ic:/msys64/usr/include用于setjmp.h和machine/setjmp.h和

-Ic:/msys64/mingw64/include用于Poco头

但错误仍然存在

我不明白哪里出错了。
提前感谢。

为了编译项目文件,我使用了如下语句:

g++ -o ../../../../target/build/debug/PLogger.o PLogger.cpp -I../../ -std=c++14 -Werror -pedantic -Wall -Wformat -Winline -Wunused -g -D_DEBUG -DPCOM_EXPORTS -fpic -c
我解决了这个错误,删除了:-std=c++14选项。但是,我遇到了一个新错误:

relocation truncated to fit: R_X86_64_PC32 against undefined symbol
WTF

正如我之前所说,我正在使用Msys2将这个项目移植到MSWindows(我第一次使用Msys2)。我开始手动安装每个软件包: gcc、gdb、make、boost、poco等

我的最终解决方案(问题已解决)是卸载Msys2,从我的计算机中删除所有文件。重新安装,然后首先:

$ pacman -Syu
$ pacman -Su
$ pacman -S mingw-w64-x86_64-toolchain    -> instead of install manually gcc
...
$ pacman -S mingw-w64-x86_64-poco
$ pacman -S git
现在一切正常。
谢谢@CookieButter的评论。

这是对
mingw
的限制吗?似乎setjmp.h应该定义
jmp_buf
sigjmp_buf
$ pacman -Syu
$ pacman -Su
$ pacman -S mingw-w64-x86_64-toolchain    -> instead of install manually gcc
...
$ pacman -S mingw-w64-x86_64-poco
$ pacman -S git