hi, i tried mx32 option, it doesn't know it. What did i do wrong?
diep@linux-ljxv:/home/213> gcc -o try64 tryp.c
diep@linux-ljxv:/home/213> gcc --version
gcc (GCC) 4.7.0
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
diep@linux-ljxv:/home/213> ./t64
bash: ./t64: No such file or directory
diep@linux-ljxv:/home/213> ./try64
p=8 bytes adress=0x7fffadd09104 size of long=8 int=4 bytes
diep@linux-ljxv:/home/213> gcc -mx32 -o try64 tryp.c
as: unrecognized option '--x32'
diep@linux-ljxv:/home/213> gcc -m32 -o try64 tryp.c
diep@linux-ljxv:/home/213> ./try64
p=4 bytes adress=0xffeef1a4 size of long=4 int=4 bytes
diep@linux-ljxv:/home/213> cat tryp.c
#include <stdio.h>
int main(void) {
int *p,i[3] = {0,1,2};
p = &i[1];
printf("p=%d bytes adress=%p size of long=%d int=%i bytes\n",
sizeof(p),p,sizeof(long),sizeof(int));
return 0;
}
diep@linux-ljxv:/home/213>