I just did a complete rebuild after make clean && make drop-prefix, and I noticed that only argv[0] and argv[1] works in the main function, the rest shows up empty. I made a minimal test case:
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("argc = %d\n", argc);
for (int i = 0; i < argc; i++)
printf("%d: %s\n", i, argv[i]);
return 0;
}
I compiled the program with m68k-amigaos-gcc -noixemul -o argtest argtest.c then launched it with argtest one two three four on the Amiga side. This is the output I got:
I just did a complete rebuild after
make clean && make drop-prefix
, and I noticed that only argv[0] and argv[1] works in the main function, the rest shows up empty. I made a minimal test case:I compiled the program with
m68k-amigaos-gcc -noixemul -o argtest argtest.c
then launched it withargtest one two three four
on the Amiga side. This is the output I got:The GCC version I'm on
m68k-amigaos-gcc (GCC) 6.5.0b 240420124408
and I'm using NDK 3.9. I uploaded the source+binary I built here just in case: https://bszili.morphos.me/stuff/argtest https://bszili.morphos.me/stuff/argtest.cThanks for the help in advance!