【发布时间】:2018-07-19 20:51:50
【问题描述】:
我在使用 Matlab (2018a) 在 Windows 中的 Armadillo (armadillo-8.500.1) 中混合 armaMex_demo_cpp 时遇到问题。
到目前为止,我正在尝试命令:
>> mex -LC:\Users\Test\Documents\Armadillo\armadillo-8.500.1-mod_for_windows\include\armadillo -LC:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin\gfortran -IC:\Users\Test\Documents\Armadillo\armadillo-8.500.1-mod_for_windows\include armaMex_demo.cpp
并获取错误消息(截断):
Building with 'Microsoft Visual C++ 2017'.
Error using mex
armaMex_demo.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include\random(31): error C4430: missing type specifier - int
assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include\random(31): error C2146: syntax error: missing ';' before
identifier 'ARMA_USE_BLAS'
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include\random(31): error C2143: syntax error: missing ';' before
'{'
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include\random(31): error C2447: '{': missing function header
(old-style formal list?)
c:\users\test\documents\armadillo\armadillo-8.500.1-mod_for_windows\include\armadillo_bits/arma_rng_cxx11.hpp(28): error C2039: 'mt19937_64': is not a
member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include\atomic(42): note: see declaration of 'std'
c:\users\test\documents\armadillo\armadillo-8.500.1-mod_for_windows\include\armadillo_bits/arma_rng_cxx11.hpp(28): error C3083: 'mt19937_64': the symbol
to the left of a '::' must be a type
c:\users\test\documents\armadillo\armadillo-8.500.1-mod_for_windows\include\armadillo_bits/arma_rng_cxx11.hpp(28): error C2039: 'result_type': is not a
member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include\atomic(42): note: see declaration of 'std'
c:\users\test\documents\armadillo\armadillo-8.500.1-mod_for_windows\include\armadillo_bits/arma_rng_cxx11.hpp(28): error C3646: 'seed_type': unknown
override specifier
有人知道我在这里可能做错了什么吗?
有人有一个可以在 Windows 中为 armaMex_demo.cpp 构建 mex 文件的工作 mex 命令吗?
【问题讨论】:
标签: windows visual-studio-2017 mex armadillo