how to tell if my code is compiled in 32 or 64 bit

3

I am using Cygwin (64 bit) on a 64 bit Windows 8 laptop. I notice a lot of the libraries/binaries/etc. say "Cygwin32" on them. If I compile my code using these, will my software take full advantage of my 64 bit processor?

How can I tell if my programs are running in 32 bit vs 64 bit?

drjrm3

Posted 2013-08-10T17:56:06.427

Reputation: 1 164

Cygwin32 simply indicates its the win32 library not a reference to anything else – Ramhound – 2013-08-10T19:07:23.100

Answers

5

You can find out what format an executable is with file.

# file putty.exe
putty.exe: PE32 executable for MS Windows (GUI) Intel 80386 32-bit

Brian

Posted 2013-08-10T17:56:06.427

Reputation: 8 439

that is for Linux. Is there something like that for Windows (Author mentioned Windows 8 laptop). – VL-80 – 2013-08-10T21:04:50.303

Cygwin is Linux-like environment for Windows. Generally an install would include utilities like file. – Brian – 2013-08-10T21:12:44.683

Thank you for explanation. I did not know. – VL-80 – 2013-08-10T21:14:02.507

Thanks, the result I got was PE32+ executable (console) x86-64, for MS Windows. What does this mean as far as 32 vs 64 bit? – drjrm3 – 2013-08-10T22:41:34.860

2x86-64 means it is a 64 bit program. – Scott Chamberlain – 2013-08-10T23:02:48.383