2016-11-15 43 views
1
gcc -m32 main.cpp 

gcc -m64 main.cpp 

gcc main.cpp 

gccのオプションで-m32,-m64、およびnothingの違いは何ですか?-m32と-m64の違いは何ですか?gccのオプションには何もありません。

+0

を示しマニュアルページを参照してください。gccのために/gcc/x86-Options.html)。使用されるデフォルトのフラグは、ビルド時にコンパイラがどのように構成されたかによって決まります。通常、64ビット環境では* -m64 *を意味します。 –

答えて

3

はhttps://gcc.gnu.org/onlinedocs([here]、それはあなたが答えを見つけるために `男gcc`を実行するか、[ここで読む]でき

-m32 -m64 Generate code for a 32-bit or 64-bit environment. 

The 32-bit environment sets int, long and pointer to 32 bits and 
generates code that runs on any i386 system. 

The 64-bit environment sets int to 32 bits and long and pointer to 
64 bits and generates code for AMD 's x86-64 architecture. 
For darwin only the -m64 option turns off the -fno-pic and -mdynamic-no-pic options. 
関連する問題