Hello everyone.
I am trying to port iGame (https://github.com/MrZammler/iGame) to AmigaOS 4, but I have an error on compiling were I need your help. I use vbcc compiler, the latest version 0.9g.
When I compile the code, I get the following error:
vc +aosppc -dontwarn=-1 -O2 -c99 -v -I/opt/sdk/ppc-amigaos/Include/include_h -I/opt/sdk/ppc-amigaos/clib2/include -I/opt/sdk/MUI_5.0/C/include -o src/funcs_AOS4.o src/funcs.c vc frontend for vbcc (c) in 1995-2016 by Volker Barthelmann vbccppc -quiet "src/funcs.c" -o= "/tmp/fileGSzXrR.scs" -dontwarn=-1 -c99 -I/opt/sdk/ppc-amigaos/Include/include_h -I/opt/sdk/ppc-amigaos/clib2/include -I/opt/sdk/MUI_5.0/C/include -elf -no-regnames -no-multiple-ccs -madd -c99 -use-commons -O=1023 -I$VBCC/targets/ppc-amigaos/include -D__amigaos4__ > ULONG data[0] warning 61 in line 4294 of "libraries/mui.h": array of size <=0 (set to 1) included from file "src/funcs.c":36 >#error "Unknown compiler" error 292 in line 89 of "stdarg.h": #error "Unknown compiler" included from file "/opt/sdk/ppc-amigaos/clib2/include/stdio.h":51 included from file "src/funcs.c":40 1 error found! vbccppc -quiet "src/funcs.c" -o= "/tmp/fileGSzXrR.scs" -dontwarn=-1 -c99 -I/opt/sdk/ppc-amigaos/Include/include_h -I/opt/sdk/ppc-amigaos/clib2/include -I/opt/sdk/MUI_5.0/C/include -elf -no-regnames -no-multiple-ccs -madd -c99 -use-commons -O=1023 -I$VBCC/targets/ppc-amigaos/include -D__amigaos4__ failed Makefile.docker:168: recipe for target 'src/funcs_AOS4.o' failed make: *** [src/funcs_AOS4.o] Error 1
The error occurs on funcs.c at line 40, which you can find at the GitHub
Thank you for all the help you can give.
Remove the "-I/opt/sdk/ppc-amigaos/clib2/include" option. You shouldn't be using clib2 header files with vbcc.
Thank you for your reply. I did what you said
I defined USE_INLINE and got the following
seems the problems reduced but does it make sense to use USE_INLINE or I shouldn't use it as well?
Managed to fix the above errors but I get something like the following
Is this a vbcc installation error? Have in mind that I use a cross compiling environment based on Linux.
Found a solution with vscppc. Compiled it from vbcc sources. Everything is now included at my Amiga VBCC docker images, which can be found at https://github.com/walkero-gr/docker4AmigaVBCC
Woohooo. I managed to compile the application. I have only one warning that seems it comes from MUI and maybe is an incompatibility with vbcc which supports only up to c99
Did anyone have the same issue before? Is it possible to resolve or should I ignore it for now? Should I create a ticket at MUI dev website?
Assuming that it's supposed to be a flexible array at the end of a struct, it should be declared as "ULONG data[];" instead of as a zero sized array which is something different and not standards compliant AFAIK.