Hello,
I installed eclipse + toolchain-gcc scrupulously following Bebbo's instructions, to whom I thank him for the excellent tutorial.
It works very well in Eclipse and now I successfully compile the programs I write, testing them in FS-UAE and also on my amiga600.
Everything worked fine until I needed to pass parameters to the program via the command line.
I wrote this simple source:
Code:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char const * const * argv) {
printf("Number of arguments passed: %d\n",argc);
for (int i=0; i<argc; i++){
printf("Arg# %d: '%s'\n", i, argv[i]);
}
return EXIT_SUCCESS;
}
The code compiles perfectly, but when I try it in FS-UAE the parameters I pass via command line are not recognized. The value of argc appears to be correctly set, but it is also not possible to read the value of argv[0], which should contain the program name. Does anyone have any idea what I'm doing wrong?