XPC target Does Not Compile
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I have following installations: MATLAB 2011b/ Microsoft visual studio 2010 professional
When I try to build my model, which is relatively simple I can generate the code successfully but the model doesn't compile(Build). I don't remember exactly, but I have been able to build and download the same model with Matlab2011a successfully. However, I'm not sure which version of compiler I was using. I have already adjusted the mex -setup, etc.
I get following strange errors,I don't know what is the problem? Any idea?:
### Building untitled: .\untitled.bat
D:\untitled_xpc_rtw>call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\..\..\VC\vcvarsall.bat"
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
### Compiling untitled.c
cl -D_MT -MT /wd4996 /fp:precise /W3 /c /nologo /O2 /Oy- -DMODEL=untitled-DRT -DNUMST=5 -DTID01EQ=1 -DNCSTATES=0 -DMT=1 -DHAVESTDIO -DXPCMSVISUALC -DXPCCALLCONV=__cdecl -DUSE_RTMODEL -DERT_CORE untitled.c
untitled.c
untitled.c(718) : error C2143: syntax error : missing ';' before 'constant'
untitled.c(718) : warning C4091: ' ' : ignored on left of 'int' when no variable is declared
untitled.c(718) : error C2109: subscript requires array or pointer type
untitled.c(719) : error C2275: 'int8_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(210) : see declaration of 'int8_T'
untitled.c(719) : error C2146: syntax error : missing ';' before identifier 'unew'
untitled.c(719) : error C2065: 'unew' : undeclared identifier
untitled.c(719) : error C2109: subscript requires array or pointer type
untitled.c(720) : error C2143: syntax error : missing ';' before '<cv-qualifer>'
untitled.c(722) : error C2143: syntax error : missing ';' before '<cv-qualifer>'
untitled.c(724) : error C2275: 'uint8_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(225) : see declaration of 'uint8_T'
untitled.c(724) : error C2146: syntax error : missing ';' before identifier 'rtb_SumofElements1'
untitled.c(724) : error C2065: 'rtb_SumofElements1' : undeclared identifier
untitled.c(725) : error C2275: 'uint8_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(225) : see declaration of 'uint8_T'
untitled.c(725) : error C2146: syntax error : missing ';' before identifier 'rtb_Compare_f'
untitled.c(725) : error C2065: 'rtb_Compare_f' : undeclared identifier
untitled.c(726) : error C2275: 'real_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(500) : see declaration of 'real_T'
untitled.c(726) : error C2146: syntax error : missing ';' before identifier 'rtb_DataTypeConversion'
untitled.c(726) : error C2065: 'rtb_DataTypeConversion' : undeclared identifier
untitled.c(727) : error C2275: 'real_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(500) : see declaration of 'real_T'
untitled.c(727) : error C2146: syntax error : missing ';' before identifier 'rtb_Product2'
untitled.c(727) : error C2065: 'rtb_Product2' : undeclared identifier
untitled.c(727) : error C2109: subscript requires array or pointer type
untitled.c(728) : error C2275: 'real_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(500) : see declaration of 'real_T'
untitled.c(728) : error C2146: syntax error : missing ';' before identifier 'rtb_Product'
untitled.c(728) : error C2065: 'rtb_Product' : undeclared identifier
untitled.c(728) : error C2109: subscript requires array or pointer type
untitled.c(729) : error C2275: 'real_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(500) : see declaration of 'real_T'
untitled.c(729) : error C2146: syntax error : missing ';' before identifier 'rtb_Product2_a'
untitled.c(729) : error C2065: 'rtb_Product2_a' : undeclared identifier
untitled.c(729) : error C2109: subscript requires array or pointer type
untitled.c(730) : error C2275: 'int16_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(241) : see declaration of 'int16_T'
untitled.c(730) : error C2146: syntax error : missing ';' before identifier 'rtb_DataTypeConversion3'
untitled.c(730) : error C2065: 'rtb_DataTypeConversion3' : undeclared identifier
untitled.c(731) : error C2275: 'uint16_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(257) : see declaration of 'uint16_T'
untitled.c(731) : error C2146: syntax error : missing ';' before identifier 'rtb_BitwiseOperator7'
untitled.c(731) : error C2065: 'rtb_BitwiseOperator7' : undeclared identifier
untitled.c(732) : error C2275: 'int8_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(210) : see declaration of 'int8_T'
untitled.c(732) : error C2146: syntax error : missing ';' before identifier 'rtb_DataTypeConversion2'
untitled.c(732) : error C2065: 'rtb_DataTypeConversion2' : undeclared identifier
untitled.c(732) : error C2109: subscript requires array or pointer type
untitled.c(733) : error C2275: 'uint16_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(257) : see declaration of 'uint16_T'
untitled.c(733) : error C2146: syntax error : missing ';' before identifier 'rtb_DataTypeConversion1_ll'
untitled.c(733) : error C2065: 'rtb_DataTypeConversion1_ll' : undeclared identifier
untitled.c(734) : error C2275: 'int8_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(210) : see declaration of 'int8_T'
untitled.c(734) : error C2146: syntax error : missing ';' before identifier 'rtb_DataTypeConversion2_b'
untitled.c(734) : error C2065: 'rtb_DataTypeConversion2_b' : undeclared identifier
untitled.c(734) : error C2109: subscript requires array or pointer type
untitled.c(735) : error C2275: 'int8_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(210) : see declaration of 'int8_T'
untitled.c(735) : error C2146: syntax error : missing ';' before identifier 'rtb_DataTypeConversion2_a'
untitled.c(735) : error C2065: 'rtb_DataTypeConversion2_a' : undeclared identifier
untitled.c(735) : error C2109: subscript requires array or pointer type
untitled.c(736) : error C2275: 'int8_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(210) : see declaration of 'int8_T'
untitled.c(736) : error C2146: syntax error : missing ';' before identifier 'rtb_DataTypeConversion2_i'
untitled.c(736) : error C2065: 'rtb_DataTypeConversion2_i' : undeclared identifier
untitled.c(736) : error C2109: subscript requires array or pointer type
untitled.c(737) : error C2275: 'int8_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(210) : see declaration of 'int8_T'
untitled.c(737) : error C2146: syntax error : missing ';' before identifier 'rtb_DataTypeConversion2_ix'
untitled.c(737) : error C2065: 'rtb_DataTypeConversion2_ix' : undeclared identifier
untitled.c(737) : error C2109: subscript requires array or pointer type
untitled.c(738) : error C2275: 'int8_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(210) : see declaration of 'int8_T'
untitled.c(738) : error C2146: syntax error : missing ';' before identifier 'rtb_DataTypeConversion2_ii'
untitled.c(738) : error C2065: 'rtb_DataTypeConversion2_ii' : undeclared identifier
untitled.c(738) : error C2109: subscript requires array or pointer type
untitled.c(739) : error C2275: 'int8_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(210) : see declaration of 'int8_T'
untitled.c(739) : error C2146: syntax error : missing ';' before identifier 'rtb_DataTypeConversion2_g'
untitled.c(739) : error C2065: 'rtb_DataTypeConversion2_g' : undeclared identifier
untitled.c(739) : error C2109: subscript requires array or pointer type
untitled.c(740) : error C2275: 'int8_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(210) : see declaration of 'int8_T'
untitled.c(740) : error C2146: syntax error : missing ';' before identifier 'rtb_DataTypeConversion2_iw'
untitled.c(740) : error C2065: 'rtb_DataTypeConversion2_iw' : undeclared identifier
untitled.c(740) : error C2109: subscript requires array or pointer type
untitled.c(741) : error C2275: 'real_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(500) : see declaration of 'real_T'
untitled.c(741) : error C2146: syntax error : missing ';' before identifier 'rtb_rad_hr'
untitled.c(741) : error C2065: 'rtb_rad_hr' : undeclared identifier
untitled.c(742) : error C2275: 'real_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(500) : see declaration of 'real_T'
untitled.c(742) : error C2146: syntax error : missing ';' before identifier 'rtb_RateLimiter2'
untitled.c(742) : error C2065: 'rtb_RateLimiter2' : undeclared identifier
untitled.c(743) : error C2275: 'int32_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(273) : see declaration of 'int32_T'
untitled.c(743) : error C2146: syntax error : missing ';' before identifier 'rtb_PulseGenerator1'
untitled.c(743) : error C2065: 'rtb_PulseGenerator1' : undeclared identifier
untitled.c(744) : error C2275: 'uint16_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(257) : see declaration of 'uint16_T'
untitled.c(744) : error C2146: syntax error : missing ';' before identifier 'rtb_BitwiseOperator6'
untitled.c(744) : error C2065: 'rtb_BitwiseOperator6' : undeclared identifier
untitled.c(745) : error C2275: 'uint16_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(257) : see declaration of 'uint16_T'
untitled.c(745) : error C2146: syntax error : missing ';' before identifier 'rtb_BitwiseOperator5'
untitled.c(745) : error C2065: 'rtb_BitwiseOperator5' : undeclared identifier
untitled.c(746) : error C2275: 'uint16_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(257) : see declaration of 'uint16_T'
untitled.c(746) : error C2146: syntax error : missing ';' before identifier 'rtb_BitwiseOperator4'
untitled.c(746) : error C2065: 'rtb_BitwiseOperator4' : undeclared identifier
untitled.c(747) : error C2275: 'uint16_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(257) : see declaration of 'uint16_T'
untitled.c(747) : error C2146: syntax error : missing ';' before identifier 'rtb_BitwiseOperator3'
untitled.c(747) : error C2065: 'rtb_BitwiseOperator3' : undeclared identifier
untitled.c(748) : error C2275: 'uint16_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(257) : see declaration of 'uint16_T'
untitled.c(748) : error C2146: syntax error : missing ';' before identifier 'rtb_BitwiseOperator2'
untitled.c(748) : error C2065: 'rtb_BitwiseOperator2' : undeclared identifier
untitled.c(749) : error C2275: 'uint16_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(257) : see declaration of 'uint16_T'
untitled.c(749) : error C2146: syntax error : missing ';' before identifier 'rtb_BitwiseOperator1'
untitled.c(749) : error C2065: 'rtb_BitwiseOperator1' : undeclared identifier
untitled.c(750) : error C2275: 'uint16_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(257) : see declaration of 'uint16_T'
untitled.c(750) : error C2146: syntax error : missing ';' before identifier 'rtb_BitwiseOperator8'
untitled.c(750) : error C2065: 'rtb_BitwiseOperator8' : undeclared identifier
untitled.c(751) : error C2275: 'int8_T' : illegal use of this type as an expression
C:\PROGRA~2\MATLAB\R2011b\extern\include\tmwtypes.h(210) : see declaration of 'int8_T'
untitled.c(751) : fatal error C1003: error count exceeds 100; stopping compilation
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
The make command returned an error of 2
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.
4 comentarios
Respuestas (1)
Gordon Weast
el 17 de Sept. de 2012
You really need to contact MathWorks tech support. You will need to supply your model as you have it configured. One of the people in our group will take a look at it once you do that.
It looks like the generated code is getting corrupted. The line numbers depend on what's in your model so it's not possible to diagnose this with just the errors from the compiler.
Gordon Weast xPC Target Development MathWorks
Ver también
Categorías
Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!