Fluid Engine Development Windows 编译出现 xmemory ‘_invalid_parameter‘: is not a member of ‘`global 解决方法

Windows 编译《Fluid Engine Development》配套的代码时出现了 ‘_invalid_parameter’: is not a member of ‘`global namespace’’ 类似的错误

https://github.com/doyubkim/fluid-engine-dev

在这里找到了解决方法:

https://github.com/microsoft/onnxruntime/issues/9735

在代码中找到 pybind11 的 common.h 去更改如下部分的代码

external\pybind11\include\pybind11\detail\common.h

原:

/// Include Python header, disable linking to pythonX_d.lib on Windows in debug mode
#if defined(_MSC_VER)
#  if (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 4)
#    define HAVE_ROUND 1
#  endif
#  pragma warning(push)
#  pragma warning(disable: 4510 4610 4512 4005)
#  if defined(_DEBUG) && !defined(Py_DEBUG)
#    define PYBIND11_DEBUG_MARKER
#    undef _DEBUG
#  endif
#endif

改为:

/// Include Python header, disable linking to pythonX_d.lib on Windows in debug mode
#if defined(_MSC_VER)
#    if (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 4)
#        define HAVE_ROUND 1
#    endif
#    include 
#    pragma warning(push)
#    pragma warning(disable : 4510 4610 4512 4005)
#    if defined(_DEBUG) && !defined(Py_DEBUG)
#        define PYBIND11_DEBUG_MARKER
#        undef _DEBUG
#    endif
#endif

你可能感兴趣的:(Fluid,Simulation,c++)