simulink coder build for raspberry pi 4 failing when using convhulln

2 Ansichten (letzte 30 Tage)
I'm using simulink to create, build and compile a C program for a raspberry pi 4. Part of my project requries the use of convhulln which uses qhull. The problem is that this results in the addtion of CFLAGs that the raspberry pi 4 does not recognize(specifically /D_EXPORTING, /wd4273, /wd4273 and /wd4324).
I can't really find a good explantion as to what those flags do or why they are added. I know that convhulln has a parameter for Qhull options(http://www.qhull.org/html/qh-optq.htm#Qa) but none seem relate to these flags.
Is there any way to remove these tags before building without modfiying the .mk file generated by matlab? Or might anyone have some insight into what those flags do?
C:\Users\Blue\Desktop\test\DEBUGCONVEXHULL_quarc_linux_pi_4>if "all" == "" ("C:\PROGRA~1\MATLAB\R2022b\bin\win64\gmake" -f DEBUGCONVEXHULL.mk all ) else ("C:\PROGRA~1\MATLAB\R2022b\bin\win64\gmake" -f DEBUGCONVEXHULL.mk all )
"C:/GW/msys/1.0/raspbian-pi3/4.9.2/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc" -c -march=armv8-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon-vfpv4 -Wall -fmessage-length=0 -MMD -MP -fpic -feliminate-unused-debug-types -DVXWORKS -DQUARC -D_GNU_SOURCE -DTARGET_TYPE=linux_pi_4 -D_RASPBERRY_PI -D_RASPBERRY_PI_4 -std=c99 -O0 -DNDEBUG /D_EXPORTING /wd4273 /wd4267 /wd4324 -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DEXT_MODE=1 -DMAT_FILE=0 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DON_TARGET_WAIT_FOR_START=1 -DTID01EQ=0 -DASSERTIONS=1 -DDOASSERTS -DMODEL=DEBUGCONVEXHULL -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -IC:/Users/Blue/Desktop/test -IC:/Users/Blue/Desktop/test/DEBUGCONVEXHULL_quarc_linux_pi_4/qhull/src/libqhull -IC:/Users/Blue/Desktop/test/DEBUGCONVEXHULL_quarc_linux_pi_4/qhull/interface -IC:/Users/Blue/Desktop/test/DEBUGCONVEXHULL_quarc_linux_pi_4 -IC:/PROGRA~1/MATLAB/R2022b/extern/include -IC:/PROGRA~1/MATLAB/R2022b/simulink/include -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2022b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2022b/toolbox/coder/rtiostream/src -IC:/PROGRA~1/MATLAB/R2022b/toolbox/coder/rtiostream/src/utils -IC:/PROGRA~1/Quanser/QUARC/include -o"global.o" "C:/Users/Blue/Desktop/test/DEBUGCONVEXHULL_quarc_linux_pi_4/qhull/src/libqhull/global.c"
arm-linux-gnueabihf-gcc: error: /D_EXPORTING: No such file or directory
arm-linux-gnueabihf-gcc: error: /wd4273: No such file or directory
arm-linux-gnueabihf-gcc: error: /wd4267: No such file or directory
arm-linux-gnueabihf-gcc: error: /wd4324: No such file or directory
gmake: *** [global.o] Error 1

Antworten (1)

Suman Sahu
Suman Sahu am 16 Aug. 2023
Hi Daniel,
These flags: /D_EXPORTING, /wd4273, /wd4273 and /wd4324 are specific to Microsofts MSVC compiler. So, it appears that you are using MSVC compiler to generate the code. Since the compiler on your Raspberry Pi is ‘gcc’ compiler, you should use the MinGW-gcc or g++ compiler when generating code. You can change this by selecting Configuration Parameters > Code Generation > Build process > Toolchain and selecting one of the MinGW64 build systems.
You can also change the compiler used for code generation by using the following command:
mex -setup
The /D_EXPORTING flag is used for defining macros during compilation. While /wd4273, /wd4273 and /wd4324 are flags are used to suppress known compiler warnings. You can read about these compiler warnings here:
Hope it was helpful

Kategorien

Mehr zu Raspberry Pi Hardware finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by