M
marctorrance
This is not strictly a problem concerning the C language, but I
figured clc might be the only place to find an answer. It's very
basic, I'm displaying the contents of the arguments vector:
int main(int argc, char* argv[])
{
/* counters */
long int i, j;
/* analyse command-line arguments */
for (i=1; i < argc; i++) {
j=0;
while (argv[j]!='\0') {
printf("%d %c ",argv[j],argv[j]);
j++;
}
printf("\n");
}
}
I'm on win32, using the latest stable release of gcc, mingw, compiling
on a FAT32 partition. It seems the whole problem is to do with this
combination.
When I execute "program /?" from the command-line it displays "47 /
99 c". This only happens if I execute the program from the FAT32
drive on which I compiled it.
If I copy the program to another drive (e.g. flash drive, NTFS
partition) it works fine, displaying "47 / 63 ?". On another machine
it's also fine. If I SUBST a new drive to point to the problem
directory and run from the SUBSTed drive, it works fine. However, if
the current directory (i.e. I guess "working directory") is anywhere
in the original FAT32 partition it displays "47 / 99 c".
"/?" is the only problem combination I've discovered (e.g. "program
-?" works OK in all cases), but it doesn't inspire me with a lot of
confidence.
Anyone seen this before or know where to look for an answer?
Thanks.
figured clc might be the only place to find an answer. It's very
basic, I'm displaying the contents of the arguments vector:
int main(int argc, char* argv[])
{
/* counters */
long int i, j;
/* analyse command-line arguments */
for (i=1; i < argc; i++) {
j=0;
while (argv[j]!='\0') {
printf("%d %c ",argv[j],argv[j]);
j++;
}
printf("\n");
}
}
I'm on win32, using the latest stable release of gcc, mingw, compiling
on a FAT32 partition. It seems the whole problem is to do with this
combination.
When I execute "program /?" from the command-line it displays "47 /
99 c". This only happens if I execute the program from the FAT32
drive on which I compiled it.
If I copy the program to another drive (e.g. flash drive, NTFS
partition) it works fine, displaying "47 / 63 ?". On another machine
it's also fine. If I SUBST a new drive to point to the problem
directory and run from the SUBSTed drive, it works fine. However, if
the current directory (i.e. I guess "working directory") is anywhere
in the original FAT32 partition it displays "47 / 99 c".
"/?" is the only problem combination I've discovered (e.g. "program
-?" works OK in all cases), but it doesn't inspire me with a lot of
confidence.
Anyone seen this before or know where to look for an answer?
Thanks.