How to get working Matlab Coder in Linux
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I followed the Webminar about Generating C++ code with Matlab Coder (<http://www.mathworks.com/company/events/webinars/wbnr56354.html?id=56354&p1=869881600&p2=869881618>) and i tried to replicate the easy examples in Linux.
I started with
function c = foo(a,b) %#codegen
c = a * b;
and I generate the project, but in the build process I got severals errors messages like:
Build error: Compilation returned error status code 2. See the target build log for further details.
1 gcc -c -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32 -g -I "/opt/MATLAB/R2011a/extern/include" -I "/opt/MATLAB/R2011a/simulink/include" -I "/opt/MATLAB/R2011a/toolbox/shared/simtargets" -I "/opt/MATLAB/R2011a/rtw/ext_mode/common" -I "/opt/MATLAB/R2011a/rtw/c/src/ext_mode/common" -I "/home/mikesol/Documents/2010/Cpp/MatlabCpp/codegen/mex/product" -I "/home/mikesol/Documents/2010/Cpp/MatlabCpp" "product.c"
2 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/cc1: /opt/MATLAB/R2011a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl_c.so.4)
3 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/cc1: /opt/MATLAB/R2011a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl_c.so.4)
4 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/cc1: /opt/MATLAB/R2011a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl.so.9)
5 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/cc1: /opt/MATLAB/R2011a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl.so.9)
6 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/cc1: /opt/MATLAB/R2011a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libgmpxx.so.4)
7 gmake: *** [product.o] Error 1
Anyone has a clue what happened?
Thanks in advance,
Michael.
0 Kommentare
Antworten (2)
John Elliott
am 24 Mai 2011
Hi, It appears that you have an incomplete install of the gcc compiler. Based on the build log, the 'gcc' command requires (for example) 'libstdc++.so', which apparently isn't installed on your machine.
Have you tried compiling the standard 'hello world' C program on your Linux system? This would be a quick check to see if you have a good install of gcc.
-John
0 Kommentare
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!