所以我试着用搅拌器编译这个翻转流体插件,所以我遵循了这个教程,https://www.youtube.com/watch?v=TVKM1egDoGs,所以我第一次运行cmake.exe -G "MinGW Makefiles" ..
,它告诉我它缺少一个CMakeLists文件……所以我加了一个...然后我运行cmake.exe --build .
,它显示了3%的错误,比如...
In file included from C:/Users/N/Downloads/Blender-FLIP-Fluids-master/src/engine/threadutils.h:29,
from C:/Users/N/Downloads/Blender-FLIP-Fluids-master/src/engine/meshlevelset.h:65,
from C:/Users/N/Downloads/Blender-FLIP-Fluids-master/src/engine/meshobject.h:30,
from C:/Users/N/Downloads/Blender-FLIP-Fluids-master/src/engine/fluidsimulation.h:38,
from C:\Users\N\Downloads\Blender-FLIP-Fluids-master\src\engine\c_bindings\fluidsimulation_c.cpp:25:
C:/PROGRA~2/MINGW-~1/I686-8~1.0-P/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/mutex:93:9: note: previous definition of 'class std::recursive_mutex'
class recursive_mutex : private __recursive_mutex_base
^~~~~~~~~~~~~~~
In file included from C:/Users/N/Downloads/Blender-FLIP-Fluids-master/src/engine/mingw32_threads/mingw.condition_variable.h:25,
from C:/Users/N/Downloads/Blender-FLIP-Fluids-master/src/engine/threadutils.h:31,
from C:/Users/N/Downloads/Blender-FLIP-Fluids-master/src/engine/meshlevelset.h:65,
from C:/Users/N/Downloads/Blender-FLIP-Fluids-master/src/engine/meshobject.h:30,
from C:/Users/N/Downloads/Blender-FLIP-Fluids-master/src/engine/fluidsimulation.h:38,
from C:\Users\N\Downloads\Blender-FLIP-Fluids-master\src\engine\c_bindings\fluidsimulation_c.cpp:25:
C:/Users/N/Downloads/Blender-FLIP-Fluids-master/src/engine/mingw32_threads/mingw.mutex.h:142:44: error: conflicting declaration 'typedef class std::_NonRecursive<std::recursive_mutex> std::mutex'
这是完整的错误https://pastebin.com/KTnALG1E,这是从哪里来的?这是一个明文错误还是什么?有人能帮帮忙吗?
发布于 2021-06-07 16:34:36
完整的错误消息包含一个更有趣的部分:
线程错误:#error此版本的MinGW似乎包含了win32端口的,并且可能已经实现了基于pThreads线程的C++11标准线程类。下面很可能会出现类重新定义错误,不幸的是,这个实现不能独立于系统头使用,因为它依赖于std::unique_lock和其他实用程序类。如果您仍然希望使用此实现(因为它更轻量级),则必须编辑MinGW的c++-config.h系统头文件,使其不定义_GLIBCXX_HAS_GTHREADS。这将阻止系统头定义实际的线程类,同时仍然定义必要的实用程序类。
因此,要么安装不同版本的mingw,要么按照上面的说明编辑您的mingw文件。
https://stackoverflow.com/questions/67868158
复制相似问题