slviajero / tinybasic

A BASIC interpreter for Arduino, ESP, RP2040, STM32, Infineon XMC and POSIX with IoT and microcontroller features.
GNU General Public License v3.0
203 stars 31 forks source link

Problems compiling for Arduino Uno #30

Closed blogmywiki closed 1 year ago

blogmywiki commented 2 years ago

I'm having problems compiling for the Arduino Uno as the target board. I keep getting the following error, regardless of what options I have defined or undefined. I'd be very grateful if anyone can shed any light on what's going wrong.

In file included from /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/TinybasicArduino.ino:212:0:
/Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/hardware-arduino.h: In function 'int freeRam()':
hardware-arduino.h:653:5: error: ambiguating new declaration of 'int freeRam()'
 int freeRam() {
     ^~~~~~~
In file included from /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/TinybasicArduino.ino:200:0:
/Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/basic.h:843:6: note: old declaration 'long int freeRam()'
 long freeRam();
      ^~~~~~~
exit status 1
ambiguating new declaration of 'int freeRam()'
pgrobelniak commented 2 years ago

Just change int to long in hardware -arduino.h

blogmywiki commented 1 year ago

Thank you - that worked!

slviajero commented 1 year ago

This is a bug in v13. I fixed it in the meantime but have not yet commited the change. Will do this today. Pavels comment is correct, it should be long everywhere in the code.

Am 08.09.2022 um 15:30 schrieb Giles Booth @.***>:

I'm having problems compiling for the Arduino Uno as the target board. I keep getting the following error, regardless of what options I have defined or undefined. I'd be very grateful if anyone can shed any light on what's going wrong.

In file included from /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/TinybasicArduino.ino:212:0: /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/hardware-arduino.h: In function 'int freeRam()': hardware-arduino.h:653:5: error: ambiguating new declaration of 'int freeRam()' int freeRam() { ^~~ In file included from /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/TinybasicArduino.ino:200:0: /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/basic.h:843:6: note: old declaration 'long int freeRam()' long freeRam(); ^~~ exit status 1 ambiguating new declaration of 'int freeRam()' — Reply to this email directly, view it on GitHub https://github.com/slviajero/tinybasic/issues/30, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSY56H6UFB3TRPPDAQOVJLV5HS57ANCNFSM6AAAAAAQHYBASI. You are receiving this because you are subscribed to this thread.

slviajero commented 1 year ago

Fixed in the repo, freeRam is now long everywhere.

Am 09.09.2022 um 07:19 schrieb Stefan Lenz @.***>:

This is a bug in v13. I fixed it in the meantime but have not yet commited the change. Will do this today. Pavels comment is correct, it should be long everywhere in the code.

Am 08.09.2022 um 15:30 schrieb Giles Booth @. @.>>:

I'm having problems compiling for the Arduino Uno as the target board. I keep getting the following error, regardless of what options I have defined or undefined. I'd be very grateful if anyone can shed any light on what's going wrong.

In file included from /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/TinybasicArduino.ino:212:0: /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/hardware-arduino.h: In function 'int freeRam()': hardware-arduino.h:653:5: error: ambiguating new declaration of 'int freeRam()' int freeRam() { ^~~ In file included from /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/TinybasicArduino.ino:200:0: /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/basic.h:843:6: note: old declaration 'long int freeRam()' long freeRam(); ^~~ exit status 1 ambiguating new declaration of 'int freeRam()' — Reply to this email directly, view it on GitHub https://github.com/slviajero/tinybasic/issues/30, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSY56H6UFB3TRPPDAQOVJLV5HS57ANCNFSM6AAAAAAQHYBASI. You are receiving this because you are subscribed to this thread.

pgrobelniak commented 1 year ago

Just change the int to long in hardware-arduono.h

czw., 8 wrz 2022, 15:30 użytkownik Giles Booth @.***> napisał:

I'm having problems compiling for the Arduino Uno as the target board. I keep getting the following error, regardless of what options I have defined or undefined. I'd be very grateful if anyone can shed any light on what's going wrong.

In file included from /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/TinybasicArduino.ino:212:0: /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/hardware-arduino.h: In function 'int freeRam()': hardware-arduino.h:653:5: error: ambiguating new declaration of 'int freeRam()' int freeRam() { ^~~ In file included from /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/TinybasicArduino.ino:200:0: /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/basic.h:843:6: note: old declaration 'long int freeRam()' long freeRam(); ^~~ exit status 1 ambiguating new declaration of 'int freeRam()'

— Reply to this email directly, view it on GitHub https://github.com/slviajero/tinybasic/issues/30, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4ZW223NRJDYFGM3TX2TFDV5HS57ANCNFSM6AAAAAAQHYBASI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

slviajero commented 1 year ago

Also changed in my repo a week ago … Was a glitch.

Am 11.10.2022 um 09:28 schrieb Paweł Grobelniak @.***>:

Just change the int to long in hardware-arduono.h

czw., 8 wrz 2022, 15:30 użytkownik Giles Booth @.***> napisał:

I'm having problems compiling for the Arduino Uno as the target board. I keep getting the following error, regardless of what options I have defined or undefined. I'd be very grateful if anyone can shed any light on what's going wrong.

In file included from /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/TinybasicArduino.ino:212:0: /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/hardware-arduino.h: In function 'int freeRam()': hardware-arduino.h:653:5: error: ambiguating new declaration of 'int freeRam()' int freeRam() { ^~~ In file included from /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/TinybasicArduino.ino:200:0: /Users/xxx/Documents/Arduino/TinyBasic/TinybasicArduino/basic.h:843:6: note: old declaration 'long int freeRam()' long freeRam(); ^~~ exit status 1 ambiguating new declaration of 'int freeRam()'

— Reply to this email directly, view it on GitHub https://github.com/slviajero/tinybasic/issues/30, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4ZW223NRJDYFGM3TX2TFDV5HS57ANCNFSM6AAAAAAQHYBASI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/slviajero/tinybasic/issues/30#issuecomment-1274212659, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSY56DNTSZWBIT2OAUIE5DWCUJIHANCNFSM6AAAAAAQHYBASI. You are receiving this because you commented.