As a preparation to using inline C-code on native mode devices I tried to compile the example program in Section 4.1 of the manual for a ZX328L:
Code: Select all
Dim b as Byte
#c
char ch;
#endc
Sub Main()
b = 5
#c
ch = zv_b;
#endc
End Sub
avr-gcc -c -DF_CPU=14745600UL -Dzx328nu -mmcu=atmega328p -I"C:/Program Files/ZBasic/zxlib" -I. -gdwarf-2 -Os -Wall -funsigned-char -fpack-struct -Wstrict-prototypes -std=gnu99 -fgnu89-inline testdouble.c -o testdouble.o
testdouble.c: In function 'zf_Main':
testdouble.c:44: error: 'zv_b' undeclared (first use in this function)
It is not clear to me why running the exact example does not work, maybe someone can be of help here?
Best regards,
Jurjen