我正在尝试mysql.cpp
在 Linux 服务器上使用 MEX 函数在 MATLAB 中编译 C++ 文件 ()。我收到这个错误,我无法弄清楚为什么?
/opt/MATLAB/R2013a/bin/mex: line 1343: g++: command not found
mex: compile of ' "mysql.cpp"' failed.
我使用这个命令:
mex -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient mysql.cpp
以下是 MEX 编译器配置详细信息:-
-> mexopts.sh sourced from directory (DIR = $PREF_DIR)
FILE = /root/.matlab/R2013a/mexopts.sh
----------------------------------------------------------------
-> MATLAB = /opt/MATLAB/R2013a
-> CC = gcc
-> CC flags:
CFLAGS = -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread
CDEBUGFLAGS = -g
COPTIMFLAGS = -O -DNDEBUG
CLIBS = -Wl,-rpath-link,/opt/MATLAB/R2013a/bin/glnxa64 -L/opt/MATLAB/R2013a/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++
arguments = -DMX_COMPAT_32
-> CXX = g++
-> CXX flags:
CXXFLAGS = -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread
CXXDEBUGFLAGS = -g
CXXOPTIMFLAGS = -O -DNDEBUG
CXXLIBS = -Wl,-rpath-link,/opt/MATLAB/R2013a/bin/glnxa64 -L/opt/MATLAB/R2013a
/bin/glnxa64 -lmx -lmex -lmat -lm
arguments = -DMX_COMPAT_32
-> FC = gfortran
-> FC flags:
FFLAGS = -fexceptions -fbackslash -fPIC -fno-omit-frame-pointer
FDEBUGFLAGS = -g
FOPTIMFLAGS = -O
FLIBS = -Wl,-rpath-link,/opt/MATLAB/R2013a/bin/glnxa64 -L/opt/MATLAB/R2013a
/bin/glnxa64 -lmx -lmex -lmat -lm
arguments = -DMX_COMPAT_32
-> LD = g++
-> Link flags:
LDFLAGS = -pthread -shared -Wl,--version-script,/opt/MATLAB/R2013a/extern
/lib/glnxa64/mexFunction.map -Wl,--no-undefined
LDDEBUGFLAGS = -g
LDOPTIMFLAGS = -O
LDEXTENSION = .mexa64
arguments = -Lusr/lib/mysql -lmysqlclient
-> LDCXX =
-> Link flags:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments = -Lusr/lib/mysql -lmysqlclient
请帮我找出问题所在。