basic c++ class

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
bastibart
Posts: 20
Joined: 12 Dec 2018 16:37

basic c++ class

Post by bastibart » 17 Dec 2018 21:45

Hello guys

This will not compile

Code: Select all

class classXX {
public:
  classXX() {;}
};


void setup() {
  classXX x1;
}
Any ideas why ?
Arduino IDE is 1.8.5
Z-Uno firmware is 2.1.4




The compiler output is:

************* Building Arduino Sketch *************

C:\Users\SEBAST~1\AppData\Local\Temp\arduino_build_196148/sketch_dec17a.ino

***************************************************



--- USING a list of libraries from:

C:\Users\Sebastian\AppData\Local\Arduino15\packages\Z-Uno\hardware\zw8051\2.1.4\libraries

D:\WPD\03_Haustechnik\04_Smarthome\Arduino\libraries

*** Collecting prototypes...

Preprocessing file: Custom.c with SDCPP...



Preprocessing file: Print.cpp with SDCPP...

Compiling Print_sdcpp_.cpp ...

Preprocessing file: Stream.cpp with SDCPP...

Compiling Stream_sdcpp_.cpp ...

Preprocessing file: HardwareSerial.cpp with SDCPP...

Compiling HardwareSerial_sdcpp_.cpp ...

Preprocessing file: HLCore.cpp with SDCPP...

Compiling HLCore_sdcpp_.cpp ...

Preprocessing file: sketch_dec17a.cpp with SDCPP...

Compiling sketch_dec17a_sdcpp_.cpp ...

Preprocessing file: Print.cpp with SDCPP...

Compiling Print_sdcpp_.cpp ...

Preprocessing file: Stream.cpp with SDCPP...

Compiling Stream_sdcpp_.cpp ...

Preprocessing file: HardwareSerial.cpp with SDCPP...

Compiling HardwareSerial_sdcpp_.cpp ...

Preprocessing file: HLCore.cpp with SDCPP...

Compiling HLCore_sdcpp_.cpp ...

Preprocessing file: sketch_dec17a.cpp with SDCPP...

Compiling sketch_dec17a_sdcpp_.cpp ...Compiling file "LLCore_arduino.c" by means of SDCC...

sdcc: Calling preprocessor...

sdcc: sdcpp.exe -nostdinc -Wall -obj-ext=.rel -D__SDCC_STACK_AUTO -D__SDCC_MODEL_LARGE -D__SDCC_INT_LONG_REENT -D__SDCC_FLOAT_REENT -D__SDCC=3_5_0 -DSDCC=350 -D__SDCC_REVISION=9253 -D__SDCC_mcs51 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem "C:\Users\Sebastian\AppData\Local\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.70/zuno_toolchain/sdcc/\bin\..\include\mcs51" -isystem "C:\Users\Sebastian\AppData\Local\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.70/zuno_toolchain/sdcc/\bin\..\include" "LLCore_arduino.c"

sdcc: Generating code...

sdcc: Calling assembler...

sdcc: sdas8051.exe -plosgffw "LLCore_arduino.rel" "LLCore_arduino".asm

Compiling file "Print_ucxx.c" by means of SDCC...

sdcc: Calling preprocessor...

sdcc: sdcpp.exe -nostdinc -Wall -obj-ext=.rel -D__SDCC_STACK_AUTO -D__SDCC_MODEL_LARGE -D__SDCC_INT_LONG_REENT -D__SDCC_FLOAT_REENT -D__SDCC=3_5_0 -DSDCC=350 -D__SDCC_REVISION=9253 -D__SDCC_mcs51 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem "C:\Users\Sebastian\AppData\Local\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.70/zuno_toolchain/sdcc/\bin\..\include\mcs51" -isystem "C:\Users\Sebastian\AppData\Local\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.70/zuno_toolchain/sdcc/\bin\..\include" "Print_ucxx.c"

sdcc: Generating code...

sdcc: Calling assembler...

sdcc: sdas8051.exe -plosgffw "Print_ucxx.rel" "Print_ucxx".asm

Compiling file "Stream_ucxx.c" by means of SDCC...

sdcc: Calling preprocessor...

sdcc: sdcpp.exe -nostdinc -Wall -obj-ext=.rel -D__SDCC_STACK_AUTO -D__SDCC_MODEL_LARGE -D__SDCC_INT_LONG_REENT -D__SDCC_FLOAT_REENT -D__SDCC=3_5_0 -DSDCC=350 -D__SDCC_REVISION=9253 -D__SDCC_mcs51 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem "C:\Users\Sebastian\AppData\Local\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.70/zuno_toolchain/sdcc/\bin\..\include\mcs51" -isystem "C:\Users\Sebastian\AppData\Local\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.70/zuno_toolchain/sdcc/\bin\..\include" "Stream_ucxx.c"

sdcc: Generating code...

sdcc: Calling assembler...

sdcc: sdas8051.exe -plosgffw "Stream_ucxx.rel" "Stream_ucxx".asm

Compiling file "HardwareSerial_ucxx.c" by means of SDCC...

sdcc: Calling preprocessor...

sdcc: sdcpp.exe -nostdinc -Wall -obj-ext=.rel -D__SDCC_STACK_AUTO -D__SDCC_MODEL_LARGE -D__SDCC_INT_LONG_REENT -D__SDCC_FLOAT_REENT -D__SDCC=3_5_0 -DSDCC=350 -D__SDCC_REVISION=9253 -D__SDCC_mcs51 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem "C:\Users\Sebastian\AppData\Local\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.70/zuno_toolchain/sdcc/\bin\..\include\mcs51" -isystem "C:\Users\Sebastian\AppData\Local\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.70/zuno_toolchain/sdcc/\bin\..\include" "HardwareSerial_ucxx.c"

sdcc: Generating code...

sdcc: Calling assembler...

sdcc: sdas8051.exe -plosgffw "HardwareSerial_ucxx.rel" "HardwareSerial_ucxx".asm

Compiling file "HLCore_ucxx.c" by means of SDCC...

sdcc: Calling preprocessor...

sdcc: sdcpp.exe -nostdinc -Wall -obj-ext=.rel -D__SDCC_STACK_AUTO -D__SDCC_MODEL_LARGE -D__SDCC_INT_LONG_REENT -D__SDCC_FLOAT_REENT -D__SDCC=3_5_0 -DSDCC=350 -D__SDCC_REVISION=9253 -D__SDCC_mcs51 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem "C:\Users\Sebastian\AppData\Local\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.70/zuno_toolchain/sdcc/\bin\..\include\mcs51" -isystem "C:\Users\Sebastian\AppData\Local\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.70/zuno_toolchain/sdcc/\bin\..\include" "HLCore_ucxx.c"

sdcc: Generating code...

sdcc: Calling assembler...

sdcc: sdas8051.exe -plosgffw "HLCore_ucxx.rel" "HLCore_ucxx".asm

Compiling file "sketch_dec17a_ucxx.c" by means of SDCC...

sdcc: Calling preprocessor...

sdcc: sdcpp.exe -nostdinc -Wall -obj-ext=.rel -D__SDCC_STACK_AUTO -D__SDCC_MODEL_LARGE -D__SDCC_INT_LONG_REENT -D__SDCC_FLOAT_REENT -D__SDCC=3_5_0 -DSDCC=350 -D__SDCC_REVISION=9253 -D__SDCC_mcs51 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem "C:\Users\Sebastian\AppData\Local\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.70/zuno_toolchain/sdcc/\bin\..\include\mcs51" -isystem "C:\Users\Sebastian\AppData\Local\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.70/zuno_toolchain/sdcc/\bin\..\include" "sketch_dec17a_ucxx.c"

sdcc: Generating code...

sketch_dec17a_ucxx.c:500: syntax error: token -> '}' ; column 1

Error. SDCC returned: 1



exit status 1
Fehler beim Kompilieren für das Board Z-Wave>ME Z-Uno.

havivi
Posts: 4
Joined: 10 Jun 2018 17:57

Re: basic c++ class

Post by havivi » 23 Dec 2018 21:16

I just hit the exact same thing! Anyone?

bastibart
Posts: 20
Joined: 12 Dec 2018 16:37

Re: basic c++ class

Post by bastibart » 24 Dec 2018 01:58

I found that the compiler is not a c++ compiler.
The prepropcessor converts everything into plain C and often fails at it.

Post Reply