Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How could I know the version of gcc is 64-bit or 32-bit?

Tags:

gcc

I am using windows 7 64-bit. I don't know the gcc installed on this computer is 32-bit or 64-bit. (Windows 7 support both 32- and 64-bit programs).

like image 216
Nick Avatar asked Oct 29 '13 07:10

Nick


People also ask

How can I tell if gcc is 32 or 64-bit?

To check this, we have to type this command. gcc –v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu ........... ........... ...........

How do I know which gcc version I have?

You need to cat the /proc/version file. This file identifies the kernel version that is currently running and gcc version used to build the kernel.

Is gcc 64bit?

Mostly compiler(gcc or clang) of C and C++, nowadays come with default 64-bit version.

How can I tell if an application is 32-bit or 64-bit?

You can learn whether it is 64-bit or 32-bit by opening its Settings menu and then by going to Help -> About Google Chrome. This opens a new tab where it tells you its version number and whether it is 64-bit or 32-bit. This approach is also used by other apps and you can use it on any Windows version.


1 Answers

You can inspect the output of gcc -v or you can use the more direct option -dumpmachine. The first option allows you to discover if GCC is capable of multilib (so that it can compile both 32 and 64-bit binaries), the second option will only return the default target (if I am not mistaken).

like image 182
rubenvb Avatar answered Oct 10 '22 05:10

rubenvb