Raspbian的Cygwin交叉编译失败,原因是'__PTHREAD SPINS';未在此范围内声明;

Raspbian的Cygwin交叉编译失败,原因是'__PTHREAD SPINS';未在此范围内声明;,cygwin,cross-compiling,raspbian,Cygwin,Cross Compiling,Raspbian,我想从我这里为拉斯宾编译一个项目。以前我可以毫无问题地编译它。然后我把raspbian更新到最新版本(草图),我的Cygwin不喜欢这样 我得到的错误如下: C:/SysGCC/Raspberry/bin/arm-linux-gnueabihf-g++.exe -c -Wall --ansi -std=c++11 -DVERSION='"0.9.0.manual_20180327_150647.30458ef1"' -DUSE_RASPICAM -DUSE_I2C -IC:/SysGCC

我想从我这里为拉斯宾编译一个项目。以前我可以毫无问题地编译它。然后我把raspbian更新到最新版本(草图),我的Cygwin不喜欢这样

我得到的错误如下:

    C:/SysGCC/Raspberry/bin/arm-linux-gnueabihf-g++.exe -c -Wall --ansi -std=c++11 -DVERSION='"0.9.0.manual_20180327_150647.30458ef1"' -DUSE_RASPICAM -DUSE_I2C -IC:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/usr/include -IC:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot/usr/local/include -o objects/projectfile.o projectfile.cpp
    In file included from c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\bits\gthr-default.h:35:0,
             from c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\bits\gthr.h:148,
             from c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\ext\atomicity.h:35,
             from c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\memory:73,
             from projectfile.cpp:7:
    c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\ext\concurrence.h:122:34: error: '__PTHREAD_SPINS' was not declared in this scope
 __gthread_mutex_t _M_mutex = __GTHREAD_MUTEX_INIT;
                              ^
    c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\ext\concurrence.h:177:44: error: '__PTHREAD_SPINS' was not declared in this scope
 __gthread_recursive_mutex_t _M_mutex = __GTHREAD_RECURSIVE_MUTEX_INIT;
                                        ^
    c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\mutex:63:31: error: '__PTHREAD_SPINS' was not declared in this scope
 __native_type  _M_mutex = __GTHREAD_MUTEX_INIT;
                           ^
    c:\sysgcc\raspberry\arm-linux-gnueabihf\include\c++\4.9\mutex:92:31: error: '__PTHREAD_SPINS' was not declared in this scope
 __native_type  _M_mutex = __GTHREAD_RECURSIVE_MUTEX_INIT;
以前我可以毫无问题地编译。所以我再次同步了sysroot,它位于C:\sysgcc\raspberry\sysroot\。 我还更新了cygwin的所有安装包

当我在谷歌上搜索失败时,我只发现libc6可能会被破坏——我重新安装了最新版本,应该可以解决这个问题,但它没有解决它

有人能告诉我下一步我能做些什么来编译吗

projectfile.cpp第7行是:

    #include <memory>
#包括

当我在pi上编译项目时,没有问题,因此系统根似乎没有问题。

我不认为cygwin相关,因为交叉编译器似乎是一个windows程序。我现在不太了解交叉编译的相关内容。当它工作时,我很高兴。现在它没有了,我也不知道如何修复它。