C++ 构建mysql-connector-c++-8.0.17-src,带窗户上的MinGW
成功完成CMake(CMake-3.12.3)后,使用以下配置步骤:C++ 构建mysql-connector-c++-8.0.17-src,带窗户上的MinGW,c++,windows,cmake,mysql-connector,mingw-w64,C++,Windows,Cmake,Mysql Connector,Mingw W64,成功完成CMake(CMake-3.12.3)后,使用以下配置步骤: cmake.exe ..\mysql-connector-c++-8.0.17-src -G "MinGW Makefiles" -DBUILD_STATIC=ON 我被困在: cmake.exe --build . --config Debug 这给了我: [ 2%] Built target save_linker_opts [ 3%] Building CXX object uuid/src/CMakeFiles
cmake.exe ..\mysql-connector-c++-8.0.17-src -G "MinGW Makefiles" -DBUILD_STATIC=ON
我被困在:
cmake.exe --build . --config Debug
这给了我:
[ 2%] Built target save_linker_opts
[ 3%] Building CXX object uuid/src/CMakeFiles/uuid_gen.dir/uuid_gen.cc.obj
D:\Daten\LiDoSourcen\mysql-connector-c++-8.0.17-src\cdk\extra\uuid\src\uuid_gen.cc:46:26: error: conflicting declaration 'typedef CRITICAL_SECTION pthread_mutex_t'
46 | typedef CRITICAL_SECTION pthread_mutex_t;
| ^~~~~~~~~~~~~~~
In file included from D:/Daten/Portable/MinGw-msys64/mingw64/include/c++/9.2.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
from D:/Daten/Portable/MinGw-msys64/mingw64/include/c++/9.2.0/x86_64-w64-mingw32/bits/gthr.h:148,
from D:/Daten/Portable/MinGw-msys64/mingw64/include/c++/9.2.0/ext/atomicity.h:35,
from D:/Daten/Portable/MinGw-msys64/mingw64/include/c++/9.2.0/bits/basic_string.h:39,
from D:/Daten/Portable/MinGw-msys64/mingw64/include/c++/9.2.0/string:55,
from D:/Daten/Portable/MinGw-msys64/mingw64/include/c++/9.2.0/stdexcept:39,
from D:\Daten\LiDoSourcen\mysql-connector-c++-8.0.17-src\cdk\extra\uuid\src\uuid_gen.cc:40:
D:/Daten/Portable/MinGw-msys64/mingw64/x86_64-w64-mingw32/include/pthread.h:271:18: note: previous declaration as 'typedef intptr_t pthread_mutex_t'
271 | typedef intptr_t pthread_mutex_t;
| ^~~~~~~~~~~~~~~
结果,
昨天我更新了MinGW/msys2环境,所以应该有最新版本的编译器
我查看了这两个位置,但没有发现任何明显的#define
或可以用来进行适当编译的东西
有任何提示或问题吗?我能够使用
mingw-w64
在windows上构建untrunc
。
安装mingw-w64时,它会要求您提供首选的线程模型,您可以更改该模型
Windows生成成功。在cygwin
中安装完所有软件包后,我安装了NASM
和YASM
,并将其路径添加到环境变量path
然后我使用MinGW构建了libav-12.3
,使用:
./configure --enable-pthreads --enable-shared
然后使用cygwin运行
make
命令。我能够使用mingw-w64
在windows上构建untrunc
。
安装mingw-w64时,它会要求您提供首选的线程模型,您可以更改该模型
Windows生成成功。在cygwin
中安装完所有软件包后,我安装了NASM
和YASM
,并将其路径添加到环境变量path
然后我使用MinGW构建了libav-12.3
,使用:
./configure --enable-pthreads --enable-shared
然后用cygwin运行
make
命令。你试过用cygwin代替MinGW吗?您的问题与类似。不,但从另一个答案来看,似乎必须通过修改编译环境来寻找答案。您找到解决方案了吗?我也有同样的问题。@Gerhardbuch你试过用Cygwin代替MinGW吗?您的问题与类似。不,但从另一个答案来看,似乎必须通过修改编译环境来寻找答案。您找到解决方案了吗?我也遇到了同样的问题。@Gerhardbuch谢谢你的提示-线程模型似乎是一个很好的研究目标…欢迎你。让我们知道你已经解决了问题和方法谢谢你的提示-线程模型似乎是一个很好的研究目标…欢迎你。让我们知道你解决了问题和方法