Compiling And linking Error for Matlab Engine Program

3 views (last 30 days)
I want to integrate Matlab with System Verilog .So I write my application in C named engdemo.c using engine routines to perform computations in matlab.Than I build Linux engine application by using mex -v -client engine engdemo.c and Run Linux Engine Application by setting in .cshrc C shell 1) setenv LD_LIBRARY_PATH/apps/mlab/R2015a/bin/glnxa64:/apps/mlab/R2015a/sys/os/glnxa64 2)setenv PATH /apps/mlab/R2015a/bin:$PATH
For Building application : gcgrh12:/home/avanip/engdemo> mex -v -client engine engdemo.c But it gives me following error after building application as mention above Verbose mode is on. Neither -compatibleArrayDims nor -largeArrayDims is selected. Using -compatibleArrayDims. In the future, MATLAB will require the use of -largeArrayDims and remove the -compatibleArrayDims option. For more information: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html. No MEX options file identified; looking for an implicit selection. ... Looking for compiler 'gcc' ... ... Executing command 'which gcc' ...Yes ('/usr/bin/gcc'). ... Executing command 'gcc -print-file-name=libstdc++.so' ...Yes ('/usr/lib/gcc/x86_64-redhat-linux/4.4.7/libstdc++.so'). Found installed compiler 'gcc'. Options file details ------------------------------------------------------------------- Compiler location: /usr/bin/gcc Options file: /apps/mlab/R2015a/bin/glnxa64/mexopts/gcc_glnxa64.xml CMDLINE1 : /usr/bin/gcc -c -DMX_COMPAT_32 -D_GNU_SOURCE -DMATLAB_MEX_FILE -I"/apps/mlab/R2015a/extern/include" -I"/apps/mlab/R2015a/simulink/include" -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG /home/avanip/engdemo/engdemo.c -o /lwa/mex_14563795252959759_5190/engdemo.o CMDLINE2 : /usr/bin/gcc -pthread -Wl,--no-undefined -Wl,-rpath-link,/apps/mlab/R2015a/bin/glnxa64 -O /lwa/mex_14563795252959759_5190/engdemo.o -L"/apps/mlab/R2015a/bin/glnxa64" -lmx -lmex -lmat -lm -lstdc++ -leng -o engdemo CMDLINE3 : rm -f /lwa/mex_14563795252959759_5190/engdemo.o CC : /usr/bin/gcc DEFINES : -DMX_COMPAT_32 -D_GNU_SOURCE -DMATLAB_MEX_FILE MATLABMEX : -DMATLAB_MEX_FILE CFLAGS : -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread INCLUDE : -I"/apps/mlab/R2015a/extern/include" -I"/apps/mlab/R2015a/simulink/include" COPTIMFLAGS : -O -DNDEBUG CDEBUGFLAGS : -g LD : /usr/bin/gcc LDFLAGS : -pthread -Wl,--no-undefined -Wl,-rpath-link,/apps/mlab/R2015a/bin/glnxa64 LDTYPE : LINKEXPORT : LINKLIBS : -L"/apps/mlab/R2015a/bin/glnxa64" -lmx -lmex -lmat -lm -lstdc++ -leng LDOPTIMFLAGS : -O LDDEBUGFLAGS : -g OBJEXT : .o LDEXT : SETENV : CC="/usr/bin/gcc" CXX="g++" CFLAGS="-ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32 -D_GNU_SOURCE -DMATLAB_MEX_FILE " CXXFLAGS="-ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32 -D_GNU_SOURCE -DMATLAB_MEX_FILE " COPTIMFLAGS="-O -DNDEBUG" CXXOPTIMFLAGS="-O -DNDEBUG" CDEBUGFLAGS="-g" CXXDEBUGFLAGS="-g" LD="/usr/bin/gcc" LDXX="g++" LDFLAGS="-pthread -Wl,--no-undefined -Wl,-rpath-link,/apps/mlab/R2015a/bin/glnxa64 -L"/apps/mlab/R2015a/bin/glnxa64" -lmx -lmex -lmat -lm -lstdc++ -leng " LDDEBUGFLAGS="-g" GCC : /usr/bin/gcc CPPLIBS : /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libstdc++.so MATLABROOT : /apps/mlab/R2015a ARCH : glnxa64 SRC : /home/avanip/engdemo/engdemo.c OBJ : /lwa/mex_14563795252959759_5190/engdemo.o OBJS : /lwa/mex_14563795252959759_5190/engdemo.o SRCROOT : /home/avanip/engdemo/engdemo DEF : /lwa/mex_14563795252959759_5190/engdemo.def EXP : engdemo.exp LIB : engdemo.lib EXE : engdemo ILK : engdemo.ilk MANIFEST : engdemo.manifest TEMPNAME : engdemo EXEDIR : EXENAME : engdemo OPTIM : -O -DNDEBUG LINKOPTIM : -O ------------------------------------------------------------------- Building with 'gcc'. /usr/bin/gcc -c -DMX_COMPAT_32 -D_GNU_SOURCE -DMATLAB_MEX_FILE -I"/apps/mlab/R2015a/extern/include" -I"/apps/mlab/R2015a/simulink/include" -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG /home/avanip/engdemo/engdemo.c -o /lwa/mex_14563795252959759_5190/engdemo.o /usr/bin/gcc -pthread -Wl,--no-undefined -Wl,-rpath-link,/apps/mlab/R2015a/bin/glnxa64 -O /lwa/mex_14563795252959759_5190/engdemo.o -L"/apps/mlab/R2015a/bin/glnxa64" -lmx -lmex -lmat -lm -lstdc++ -leng -o engdemo /apps/mlab/R2015a/bin/glnxa64/libmwservices.so: undefined reference to `std::range_error::~range_error()@GLIBCXX_3.4.15' /apps/mlab/R2015a/bin/glnxa64/libut.so: undefined reference to `std::__detail::_List_node_base::_M_unhook()@GLIBCXX_3.4.15' /apps/mlab/R2015a/bin/glnxa64/libmwservices.so: undefined reference to `std::length_error::~length_error()@GLIBCXX_3.4.15' /apps/mlab/R2015a/bin/glnxa64/libmwfl.so: undefined reference to `std::invalid_argument::~invalid_argument()@GLIBCXX_3.4.15' /apps/mlab/R2015a/bin/glnxa64/libboost_signals.so.1.49.0: undefined reference to `std::__detail::_List_node_base::_M_reverse()@GLIBCXX_3.4.15' /apps/mlab/R2015a/bin/glnxa64/libboost_log.so.1.49.0: undefined reference to `std::__detail::_List_node_base::swap(std::__detail::_List_node_base&, std::__detail::_List_node_base&)@GLIBCXX_3.4.15' /apps/mlab/R2015a/bin/glnxa64/libboost_log.so.1.49.0: undefined reference to `std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)@GLIBCXX_3.4.15' /apps/mlab/R2015a/bin/glnxa64/libut.so: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)@GLIBCXX_3.4.15' /apps/mlab/R2015a/bin/glnxa64/libmwi18n.so: undefined reference to `std::out_of_range::~out_of_range()@GLIBCXX_3.4.15' /apps/mlab/R2015a/bin/glnxa64/libmwservices.so: undefined reference to `std::domain_error::~domain_error()@GLIBCXX_3.4.15' /apps/mlab/R2015a/bin/glnxa64/libmwservices.so: undefined reference to `std::underflow_error::~underflow_error()@GLIBCXX_3.4.15' /apps/mlab/R2015a/bin/glnxa64/libmwservices.so: undefined reference to `std::overflow_error::~overflow_error()@GLIBCXX_3.4.15' collect2: ld returned 1 exit status
Can anyone help me on this

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!