引擎Matlab问题 [英] Engine Matlab issues
问题描述
我是在一个c ++程序中实现Matlab的triyng。 http://www.cl.cam.ac.uk/~sjeh3/wii /
应用程序正在使用gtk a wii mote lib和Matlab相机校准工具箱( http://www.vision.caltech.edu/bouguetj/calib_doc/ )。它工作完美。
我想使用matlab ploting工具来构建应用程序提供的图形。但我有问题用matlab引擎构建应用程序。
在main.cpp中,我只是添加了matlab示例engdemo.cpp的代码在main函数中,包括engine.h和mex.h.
即使像engdemo.cpp这样的示例总是出现这样的错误:
mex:... mexa64的链接失败。 >
这里是控制台视图:
root @ ubuntu:/ home / hugo / Bureau / sjeh3-wii / wmgui#./build2
---------------------------------- ------------------------------
- > mbuildopts.sh源自目录(DIR = $ HOME / .matlab / $ REL_VERSION)
FILE = /root/.matlab/R2009b/mbuildopts.sh
----------- -------------------------------------------------- ---
- > TMW_ROOT = / home / hugo / Matlab
- > CC = g ++ - 4.1
- > CC标志:
CFLAGS = -ansi -D_GNU_SOURCE -I / home / hugo / Matlab / extern / include / cpp -I / home / hugo / Matlab / extern / include -DUNIX -DX11 -DGLNXA64 -DGCC -pthread
CDEBUGFLAGS = -g
COPTIMFLAGS = -O -DNDEBUG
CLIBS = -Wl,-rpath-link,/ home / hugo / Matlab / bin / glnxa64 -L / home / hugo / runtime / glnxa64 -lmwmclmcrrt -lm
arguments =
- > LD = g ++ - 4.1
- >链接标志:
LDFLAGS = -pthread
LDDEBUGFLAGS = -g
LDOPTIMFLAGS = -O
arguments = -L / usr / lib / -L ../ toolbox -L .. / libcwiid -L ../ libcwiid -L / opt / gnome / lib64 -L / home / hugo / Matlab / bin / glnxa64 -L / home / hugo / Matlab / extern / include -L ../../ matlablibtest /工具箱
--------------------------------------------- -------------------
- > g ++ - 4.1 -c -I / usr / include / cairo -I / usr / include / freetype2 -I / usr / include / libpng12 -I / opt / gnome / include / gtk-2.0 -I / usr / include / 2.0 -I / usr / include / atk-1.0 -I / usr / include / pango-1.0 -I / usr / include / glib-2.0-I / usr / lib / glib- 2.0 / include -I / usr / gtk-2.0 / include -I ../libcwiid -I ../ toolbox -I / opt / matlab / extern / include -I / usr / lib -I / home / hugo / Matlab / extern / include -I / home / hugo / Matlab / bin / glnxa64 -ansi -D_GNU_SOURCE -I / home / hugo / Matlab / extern / include / cpp -I / home / hugo / Matlab / extern / include -DUNIX -DX11 -DGLNXA64 -DGCC -pthread -g main.cpp
- > g ++ - 4.1 -c -I / usr / include / cairo -I / usr / include / freetype2 -I / usr / include / libpng12 -I / opt / gnome / include / gtk-2.0 -I / usr / include / 2.0 -I / usr / include / atk-1.0 -I / usr / include / pango-1.0 -I / usr / include / glib-2.0-I / usr / lib / glib- 2.0 / include -I / usr / gtk-2.0 / include -I ../libcwiid -I ../ toolbox -I / opt / matlab / extern / include -I / usr / lib -I / home / hugo / Matlab / extern / include -I / home / hugo / Matlab / bin / glnxa64 -ansi -D_GNU_SOURCE -I / home / hugo / Matlab / extern / include / cpp -I / home / hugo / Matlab / extern / include -DUNIX -DX11 -DGLNXA64 -DGCC -pthread -g interface.cpp
- > g ++ - 4.1 -c -I / usr / include / cairo -I / usr / include / freetype2 -I / usr / include / libpng12 -I / opt / gnome / include / gtk-2.0 -I / usr / include / 2.0 -I / usr / include / atk-1.0 -I / usr / include / pango-1.0 -I / usr / include / glib-2.0-I / usr / lib / glib- 2.0 / include -I / usr / gtk-2.0 / include -I ../libcwiid -I ../ toolbox -I / opt / matlab / extern / include -I / usr / lib -I / home / hugo / Matlab / extern / include -I / hugo / Matlab / bin / glnxa64 -ansi -D_GNU_SOURCE -I / home / hugo / Matlab / extern / include / cpp -I / home / hugo / Matlab / extern / include -DUNIX -DX11 -DGLNXA64 -DGCC -pthread -g support.cpp
- > g ++ - 4.1 -g -pthread -L / usr / lib / -L ../ toolbox -L ../ libcwiid -L ../ libcwiid -L / opt / gnome / lib64 -L / home / hugo / Matlab / bin / glnxa64 -L / home / hugo / Matlab / extern / include -L ../../ matlablibtest / toolbox -o wmgui main.o interface.o support.o -Wl,-rpath-link,/ home / hugo / Matlab / bin / glnxa64 -L / home / hugo / Matlab / runtime / glnxa64 -lmwmclmcrrt -lm -lcalib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango- 1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lfreetype -lz -lfontconfig -lexpat -lglitz -lm -lpng12 -lXrender -lX11 -lpthread -lXau -lXdmcp -lgthread-2.0 -lglib-2.0 -lm -lcwiid
main.o:在函数`main'中:
/home/hugo/Bureau/sjeh3-wii/wmgui/main.cpp:363:未定义引用`engOpen'
/home/hugo/Bureau/sjeh3-wii/wmgui/main.cpp:367:未定义引用`engEvalString'
collect2:ld返回1退出状态
mbuild:链接'wmgui '失败。
root @ ubuntu:/ home / hugo / Bureau / sjeh3-wii / wmgui#./build2
- > mexopts.sh源自目录(DIR = $ HOME / .matlab / $ REL_VERSION)
FILE = /root/.matlab/R2009b/mexopts.sh
----------- -------------------------------------------------- ---
- > MATLAB = / home / hugo / Matlab
- > CC = gcc-4.1
- > CC标志:
CFLAGS = -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread
CDEBUGFLAGS = -g
COPTIMFLAGS = -O -DNDEBUG
CLIBS = -Wl,-rpath-link,/ home / hugo / Matlab / bin / glnxa64 -L / home / hugo / Matlab / bin / glnxa64 -lmx -lmex -lmat -lm -lstdc ++
arguments = -DMX_COMPAT_32
- > CXX = g ++ - 4.1
- > CXX标志:
CXXFLAGS = -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread
CXXDEBUGFLAGS = -g
CXXOPTIMFLAGS = -O -DNDEBUG
CXXLIBS = wl,-rpath-link,/ home / hugo / Matlab / bin / glnxa64 -L / home / hugo / Matlab / bin / glnxa64 -lmx -lmex -lmat -lm
arguments = -DMX_COMPAT_32
- > FC = g95
- > FC标志:
FFLAGS = -fexceptions -fPIC -fno-omit-frame-pointer
FDEBUGFLAGS = -g
FOPTIMFLAGS = -O
FLIBS = -W1,-rpath-link ,/ home / hugo / Matlab / bin / glnxa64 -L / home / hugo / Matlab / bin / glnxa64 -lmx -lmex -lmat -lm
arguments = -DMX_COMPAT_32
- > LD = g ++ - 4.1
- >链接标志:
LDFLAGS = -pthread -shared -Wl, - version-script,/ home / hugo / Matlab / extern / lib / glnxa64 / mexFunction.map -Wl, - no-undefined
LDDEBUGFLAGS = -g
LDOPTIMFLAGS = -O
LDEXTENSION = .mexa64
arguments = -lang cpp -L / usr / lib / -L ../ toolbox -L ../ libcwiid -lcalib -L ../ libcwiid -L / opt / gnome / lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule -2.0 -ldl -lfreetype -lz -lfontconfig -lexpat -lglitz -lm -lpng12 -lXrender -lX11 -lpthread -lXau -lXdmcp -lgthread-2.0 -lglib-2.0 -lm -lcwiid -L / home / hugo / Matlab / bin / glnxa64 -L / home / hugo / Matlab / extern / include -L ../../ matlablibtest / toolbox
- > LDCXX =
- >链接标志:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments = -lang cpp -L / usr / lib / -L ../ toolbox - L ../ libcwiid -lcalib -L ../ libcwiid -L / opt / gnome / lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 - lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lfreetype -lz -lfontconfig -lexpat -lglitz -lm -lpng12 -lXrender -lX11 -lpthread -lXau -lXdmcp -lgthread-2.0 -lglib-2.0 -lm -lcwiid -L / home / hugo / Matlab / bin / glnxa64 -L / home / hugo / Matlab / extern / include -L ../../ matlablibtest / toolbox
-------------- --------------------------------------------------
- > g ++ - 4.1 -c -I / usr / include / cairo -I / usr / include / freetype2 -I / usr / include / libpng12 -I / opt / gnome / include / gtk-2.0 -I / usr / include / 2.0 -I / usr / include / atk-1.0 -I / usr / include / pango-1.0 -I / usr / include / glib-2.0-I / usr / lib / glib- 2.0 / include -I / usr / gtk-2.0 / include -I ../libcwiid -I ../ toolbox -I / opt / matlab / extern / include -I / usr / lib -I / home / hugo / Matlab / extern / include -I / home / hugo / Matlab / bin / glnxa64 -I / home / hugo / Matlab / extern / include -I / home / hugo / Matlab / simulink / include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fPIC-fno-omit-frame-pointer -pthread- DMX_COMPAT_32 -gmain.cpp
- > g ++ - 4.1 -c -I / usr / include / cairo -I / usr / include / freetype2 -I / usr / include / libpng12 -I / opt / gnome / include / gtk-2.0 -I / usr / include / 2.0 -I / usr / include / atk-1.0 -I / usr / include / pango-1.0 -I / usr / include / glib-2.0-I / usr / lib / glib- 2.0 / include -I / usr / gtk-2.0 / include -I ../libcwiid -I ../ toolbox -I / opt / matlab / extern / include -I / usr / lib -I / home / hugo / Matlab / extern / include -I / home / hugo / Matlab / bin / glnxa64 -I / home / hugo / Matlab / extern / include -I / home / hugo / Matlab / simulink / include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fPIC-fno-omit-frame-pointer -pthread- DMX_COMPAT_32 -ginterface.cpp
- > g ++ - 4.1 -c -I / usr / include / cairo -I / usr / include / freetype2 -I / usr / include / libpng12 -I / opt / gnome / include / gtk-2.0 -I / usr / include / 2.0 -I / usr / include / atk-1.0 -I / usr / include / pango-1.0 -I / usr / include / glib-2.0-I / usr / lib / glib- 2.0 / include -I / usr / gtk-2.0 / include -I ../libcwiid -I ../ toolbox -I / opt / matlab / extern / include -I / usr / lib -I / home / hugo / Matlab / extern / include -I / home / hugo / Matlab / bin / glnxa64 -I / home / hugo / Matlab / extern / include -I / home / hugo / Matlab / simulink / include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fPIC-fno-omit-frame-pointer -pthread- DMX_COMPAT_32 -gsupport.cpp
- > g ++ - 4.1 -g -pthread -shared -Wl, - version-script,/ home / hugo / Matlab / extern / lib / glnxa64 / mexFunction.map -Wl, - no-undefined -owmgui.mexa64main .o interface.o support.o -lang cpp -L / usr / lib / -L ../ toolbox -L ../ libcwiid -lcalib -L ../ libcwiid -L / opt / gnome / lib64 -lgtk-x11 -2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lfreetype -lz -lfontconfig -lexpat -lglitz -lm -lpng12 -lXrender -lX11 -lpthread -lXau -lXdmcp -lgthread-2.0 -lglib-2.0 -lm -lcwiid -L / home / hugo / Matlab / bin / glnxa64 -L / home / hugo / Matlab / extern / include -L .. /../matlablibtest/toolbox -Wl,-rpath-link,/ home / hugo / Matlab / bin / glnxa64 -L / home / hugo / Matlab / bin / glnxa64 -lmx -lmex -lmat -lm
g ++ - 4.1:cpp:Aucun fichier ou dossier de ce type
mex:link of'wmgui.mexa64'failed。
#!/ bin / sh
(mex或mbuild)-v -g -output wmgui main.cpp interface.cpp support.cpp -lang cpp \
-L / usr / lib / -L ../ toolbox -L ../ libcwiid -lcalib -L ../ libcwiid -L / opt / gnome / lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 - latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lfreetype -lz -lfontconfig -lexpat -lglitz -lm -lpng12 -lXrender -lX11 -lpthread -lXau - lxdmcp -lgthread-2.0 -lglib-2.0 -lm -lcwiid -L / home / hugo / Matlab / bin / glnxa64 -L / home / hugo / Matlab / extern / include -L ../../ matlablibtest / toolbox \
-I / usr / include / cairo -I / usr / include / freetype2 -I / usr / include / libpng12 -I / opt / gnome / include / gtk-2.0 -I / usr / include / gtk-2.0 -I / usr / include / atk-1.0 -I / usr / include / pango-1.0 -I / usr / include / glib-2.0 -I / usr / lib / glib-2.0 / include -I / usr / lib / gtk -2.0 / include -I ../ libcwiid -I ../ toolbox -I / opt / matlab / extern / include -I / usr / lib -I / home / hugo / Matlab / extern / include -I / home / hugo / Matlab / bin / glnxa64
我忘了说我想使用Matlab引擎而不是我的c应用在matlab。也许它不是那么清楚。
真的,
Hugo
如果发现我的问题。我正在编译我的应用程序使用mexopts.sh conf而不是engopts.sh
成功的编译后,我有错误无法启动Matlab引擎。我只是apt-get安装csh。它工作。
I am triyng to implement Matlab in a c++ program. http://www.cl.cam.ac.uk/~sjeh3/wii/ The application is using gtk a wii mote lib and the Matlab Camera Calibration Toolbox (http://www.vision.caltech.edu/bouguetj/calib_doc/ ). it works perfectly. I want to use matlab ploting tools to build a graphic provided by the application. But i am having issues building the app with matlab engine .
In the main.cpp i just added the code from the matlab example engdemo.cpp in the main function and included engine.h and mex.h. Even with the examples like engdemo.cpp i always have this error :
mex: link of ' "...mexa64"' failed.
here are the console views:
root@ubuntu:/home/hugo/Bureau/sjeh3-wii/wmgui# ./build2
----------------------------------------------------------------
-> mbuildopts.sh sourced from directory (DIR = $HOME/.matlab/$REL_VERSION)
FILE = /root/.matlab/R2009b/mbuildopts.sh
----------------------------------------------------------------
-> TMW_ROOT = /home/hugo/Matlab
-> CC = g++-4.1
-> CC flags:
CFLAGS = -ansi -D_GNU_SOURCE -I/home/hugo/Matlab/extern/include/cpp -I/home/hugo/Matlab/extern/include -DUNIX -DX11 -DGLNXA64 -DGCC -pthread
CDEBUGFLAGS = -g
COPTIMFLAGS = -O -DNDEBUG
CLIBS = -Wl,-rpath-link,/home/hugo/Matlab/bin/glnxa64 -L/home/hugo/Matlab/runtime/glnxa64 -lmwmclmcrrt -lm
arguments =
-> LD = g++-4.1
-> Link flags:
LDFLAGS = -pthread
LDDEBUGFLAGS = -g
LDOPTIMFLAGS = -O
arguments = -L/usr/lib/ -L../toolbox -L../libcwiid -L../libcwiid -L/opt/gnome/lib64 -L/home/hugo/Matlab/bin/glnxa64 -L/home/hugo/Matlab/extern/include -L../../matlablibtest/toolbox
----------------------------------------------------------------
-> g++-4.1 -c -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/usr/include/gtk-2.0 -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I../libcwiid -I../toolbox -I/opt/matlab/extern/include -I/usr/lib -I/home/hugo/Matlab/extern/include -I/home/hugo/Matlab/bin/glnxa64 -ansi -D_GNU_SOURCE -I/home/hugo/Matlab/extern/include/cpp -I/home/hugo/Matlab/extern/include -DUNIX -DX11 -DGLNXA64 -DGCC -pthread -g "main.cpp"
-> g++-4.1 -c -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/usr/include/gtk-2.0 -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I../libcwiid -I../toolbox -I/opt/matlab/extern/include -I/usr/lib -I/home/hugo/Matlab/extern/include -I/home/hugo/Matlab/bin/glnxa64 -ansi -D_GNU_SOURCE -I/home/hugo/Matlab/extern/include/cpp -I/home/hugo/Matlab/extern/include -DUNIX -DX11 -DGLNXA64 -DGCC -pthread -g "interface.cpp"
-> g++-4.1 -c -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/usr/include/gtk-2.0 -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I../libcwiid -I../toolbox -I/opt/matlab/extern/include -I/usr/lib -I/home/hugo/Matlab/extern/include -I/home/hugo/Matlab/bin/glnxa64 -ansi -D_GNU_SOURCE -I/home/hugo/Matlab/extern/include/cpp -I/home/hugo/Matlab/extern/include -DUNIX -DX11 -DGLNXA64 -DGCC -pthread -g "support.cpp"
-> g++-4.1 -g -pthread -L/usr/lib/ -L../toolbox -L../libcwiid -L../libcwiid -L/opt/gnome/lib64 -L/home/hugo/Matlab/bin/glnxa64 -L/home/hugo/Matlab/extern/include -L../../matlablibtest/toolbox -o wmgui main.o interface.o support.o -Wl,-rpath-link,/home/hugo/Matlab/bin/glnxa64 -L/home/hugo/Matlab/runtime/glnxa64 -lmwmclmcrrt -lm -lcalib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lfreetype -lz -lfontconfig -lexpat -lglitz -lm -lpng12 -lXrender -lX11 -lpthread -lXau -lXdmcp -lgthread-2.0 -lglib-2.0 -lm -lcwiid
main.o: In function `main':
/home/hugo/Bureau/sjeh3-wii/wmgui/main.cpp:363: undefined reference to `engOpen'
/home/hugo/Bureau/sjeh3-wii/wmgui/main.cpp:367: undefined reference to `engEvalString'
collect2: ld returned 1 exit status
mbuild: link of 'wmgui' failed.
root@ubuntu:/home/hugo/Bureau/sjeh3-wii/wmgui# ./build2
-> mexopts.sh sourced from directory (DIR = $HOME/.matlab/$REL_VERSION)
FILE = /root/.matlab/R2009b/mexopts.sh
----------------------------------------------------------------
-> MATLAB = /home/hugo/Matlab
-> CC = gcc-4.1
-> CC flags:
CFLAGS = -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread
CDEBUGFLAGS = -g
COPTIMFLAGS = -O -DNDEBUG
CLIBS = -Wl,-rpath-link,/home/hugo/Matlab/bin/glnxa64 -L/home/hugo/Matlab/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++
arguments = -DMX_COMPAT_32
-> CXX = g++-4.1
-> CXX flags:
CXXFLAGS = -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread
CXXDEBUGFLAGS = -g
CXXOPTIMFLAGS = -O -DNDEBUG
CXXLIBS = -Wl,-rpath-link,/home/hugo/Matlab/bin/glnxa64 -L/home/hugo/Matlab/bin/glnxa64 -lmx -lmex -lmat -lm
arguments = -DMX_COMPAT_32
-> FC = g95
-> FC flags:
FFLAGS = -fexceptions -fPIC -fno-omit-frame-pointer
FDEBUGFLAGS = -g
FOPTIMFLAGS = -O
FLIBS = -Wl,-rpath-link,/home/hugo/Matlab/bin/glnxa64 -L/home/hugo/Matlab/bin/glnxa64 -lmx -lmex -lmat -lm
arguments = -DMX_COMPAT_32
-> LD = g++-4.1
-> Link flags:
LDFLAGS = -pthread -shared -Wl,--version-script,/home/hugo/Matlab/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined
LDDEBUGFLAGS = -g
LDOPTIMFLAGS = -O
LDEXTENSION = .mexa64
arguments = -lang cpp -L/usr/lib/ -L../toolbox -L../libcwiid -lcalib -L../libcwiid -L/opt/gnome/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lfreetype -lz -lfontconfig -lexpat -lglitz -lm -lpng12 -lXrender -lX11 -lpthread -lXau -lXdmcp -lgthread-2.0 -lglib-2.0 -lm -lcwiid -L/home/hugo/Matlab/bin/glnxa64 -L/home/hugo/Matlab/extern/include -L../../matlablibtest/toolbox
-> LDCXX =
-> Link flags:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments = -lang cpp -L/usr/lib/ -L../toolbox -L../libcwiid -lcalib -L../libcwiid -L/opt/gnome/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lfreetype -lz -lfontconfig -lexpat -lglitz -lm -lpng12 -lXrender -lX11 -lpthread -lXau -lXdmcp -lgthread-2.0 -lglib-2.0 -lm -lcwiid -L/home/hugo/Matlab/bin/glnxa64 -L/home/hugo/Matlab/extern/include -L../../matlablibtest/toolbox
----------------------------------------------------------------
-> g++-4.1 -c -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/usr/include/gtk-2.0 -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I../libcwiid -I../toolbox -I/opt/matlab/extern/include -I/usr/lib -I/home/hugo/Matlab/extern/include -I/home/hugo/Matlab/bin/glnxa64 -I/home/hugo/Matlab/extern/include -I/home/hugo/Matlab/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32 -g "main.cpp"
-> g++-4.1 -c -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/usr/include/gtk-2.0 -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I../libcwiid -I../toolbox -I/opt/matlab/extern/include -I/usr/lib -I/home/hugo/Matlab/extern/include -I/home/hugo/Matlab/bin/glnxa64 -I/home/hugo/Matlab/extern/include -I/home/hugo/Matlab/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32 -g "interface.cpp"
-> g++-4.1 -c -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/usr/include/gtk-2.0 -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I../libcwiid -I../toolbox -I/opt/matlab/extern/include -I/usr/lib -I/home/hugo/Matlab/extern/include -I/home/hugo/Matlab/bin/glnxa64 -I/home/hugo/Matlab/extern/include -I/home/hugo/Matlab/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32 -g "support.cpp"
-> g++-4.1 -g -pthread -shared -Wl,--version-script,/home/hugo/Matlab/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined -o "wmgui.mexa64" main.o interface.o support.o -lang cpp -L/usr/lib/ -L../toolbox -L../libcwiid -lcalib -L../libcwiid -L/opt/gnome/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lfreetype -lz -lfontconfig -lexpat -lglitz -lm -lpng12 -lXrender -lX11 -lpthread -lXau -lXdmcp -lgthread-2.0 -lglib-2.0 -lm -lcwiid -L/home/hugo/Matlab/bin/glnxa64 -L/home/hugo/Matlab/extern/include -L../../matlablibtest/toolbox -Wl,-rpath-link,/home/hugo/Matlab/bin/glnxa64 -L/home/hugo/Matlab/bin/glnxa64 -lmx -lmex -lmat -lm
g++-4.1: cpp: Aucun fichier ou dossier de ce type
mex: link of ' "wmgui.mexa64"' failed.
#!/bin/sh
(mex or mbuild) -v -g -output wmgui main.cpp interface.cpp support.cpp -lang cpp \
-L/usr/lib/ -L../toolbox -L../libcwiid -lcalib -L../libcwiid -L/opt/gnome/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lfreetype -lz -lfontconfig -lexpat -lglitz -lm -lpng12 -lXrender -lX11 -lpthread -lXau -lXdmcp -lgthread-2.0 -lglib-2.0 -lm -lcwiid -L/home/hugo/Matlab/bin/glnxa64 -L/home/hugo/Matlab/extern/include -L../../matlablibtest/toolbox \
-I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/usr/include/gtk-2.0 -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I../libcwiid -I../toolbox -I/opt/matlab/extern/include -I/usr/lib -I/home/hugo/Matlab/extern/include -I/home/hugo/Matlab/bin/glnxa64
I forgot to say that i wanted to use Matlab engine and not my c++ application in matlab. maybe it wasn't so clear. I don't think the program will work as a mex-file.
Sincerely, Hugo
If found my issue. i was compiling my application using mexopts.sh conf and not engopts.sh After the succeful compilation i had the Error Can't start Matlab engine. i just apt-get install csh. and it work.
这篇关于引擎Matlab问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!