Solved c compiler - 64 bit ?

July 20, 2014 at 05:31:23
Specs: w7, x86-64
I'm having a question regarding free C compiler on the net.
If I want to have a simple C compiler, but one that creates 64-bit executables, is it possible to download such a compiler ?

I feel like either you can download free 32-bit C compilers, or 64-bit compilers that cost some money.

Is that correct ? If feels a bit weird to continue compiling in 32-bit, now while XP is gone, which was the last Windows that had more 32-bit installs than other bitversions.

Hi there.


See More: c compiler - 64 bit ?

Report •


#1
July 20, 2014 at 06:50:37
✔ Best Answer
Both MinGW and Win7 SDK's complier are free and capable of building Win x64 binaries. It may not default to that, because honestly what does your program need with over 4GB of address space?

How To Ask Questions The Smart Way


Report •

#2
July 20, 2014 at 10:13:02
I don't need to address more than 4 gig, but I do need to create an executable that will last as long as the OS itself does.

I'm referring to the problem with 16-bit executables not running on 64-OS'es.
So, I'm assuming/fearing that 32-bit executables may some day not run on some new type of OS, be it 128 bit, or whatever.

Don't understand why one absolutely needs to develop software with old bit-version, maybe there something I don't understand. 32-bit OS are outdated in 2014, both for server and home-computers.

Hi there.


Report •

#3
July 20, 2014 at 12:16:47
There's a lot more to 64-bit than just memory size. Twice the number of registers for the compiler to use and a far more efficient function-calling strategy both help to optimize programs. A decent compiler will produce notably more efficient code in 64-bit mode.

Report •

Related Solutions

#4
July 20, 2014 at 12:28:36
Well, let's put it this way. Microsoft dropped Win16 support with the move to 64-bit. With that in mind, let's look at how that played out.

Let's assume by 16-bit, you're referring to Windows 3.0. Win3.1 was backward compatible with 3.0, which in turn was the target for backwards compatibility in Win95+. So, any Windows application written after 1990.

Let's assume by 64-bit, you're referring to IA-64, the first 64-bit processor to be supported by MS. First supported in WinXP, released in 2001. That's 11-years of backwards compatibility. What are you writing that needs to survive a decade? If we throw in when 64-bit became popular, (Win7, released 2009) you're looking at almost 2 decades of backwards compatibility.

Granted, this is a naive view. Most Win16 apps fell on the wayside either because they didn't fall in-line with the new Win32 look, or because they interacted with a Windows subsystem that was either removed or changed so much that it became unrecognizable. Ignoring the Modern UI, current Win64 looks like Win32, so you currently don't gain any advantage there. If you don't ignore WinRT, then your app needs to be compatible with WinRT (not to be confused with WinRT), so you're limited to 32-bits.

Microsoft labeled the Desktop the legacy environment, to be phased out for Windows Modern (formally Metro). While MS appears to be backtracking as hard as they can, there is a lesson to be learned. You'll sooner have the Desktop rug ripped out from under you than the 32-bit emulation.

Foregoing all that, "everyone" will tell you we're moving to a cloud and phone/tablet model like it's the 1970's. That means if you want to write software that'll stand the test of time, you should be looking at Android and Linux. I'm not seeing this myself, but I'd be doing you a disservice if I didn't provide a warning.

Let me finish off this wall of text by saying there are legit and good reasons to move to x64, but don't worry about forward compatibility. Trust me, every practicing programmer looks at their old stuff and cringes, so try not to worry about it.

tl;dr: x86-64 will be around for a long time. In fact, we're not even using all 64 pins yet.

EDIT:
ijack:
A decent compiler will produce notably more efficient code in 64-bit mode.
I suppose? Modern practices love to break everything up into recursive calls and tiny functions, but how often do you find yourself CPU bound?

How To Ask Questions The Smart Way

message edited by Razor2.3


Report •

#5
July 20, 2014 at 20:02:36
I don't think compatibility with 32 bit applications will be going away any time soon. In spite of what Microsoft might wish or what experts may predict, there are just too many 32 bit applications in regular use for that too happen.

Back in 1982 when Intel introduced protected mode with the 80286 they predicted that real mode DOS would soon be rendered obsolete. Things didn't work out that way. Understand that real mode DOS did not have a long history at this point, PCDOS 1.0 having been introduced only 1 year before. It is now 32 years later and many home users are still running DOS games and other applications. Many businesses are still relying on DOS for critical applications. Many have no immediate plans to upgrade. I believe that compatibility with 16 bit applications is a major reason why Microsoft still produces 32 bit client operating systems. Server 2008 was the last 32 bit server OS.

The most recent 64 bit systems have barely scratched the surface of their true potential. The current process virtual address space is only 8 TB while the 64 bit CPU can support 256 TB. Neither are hard limits but imposed for practical considerations. Some editions of Server 2012 can support up to 4 TB of RAM. That limit only exists because Microsoft was unable test it with more.


Report •

#6
July 21, 2014 at 07:00:50
Yes, but the bottom line is, why creating new programs with old bit version ?

Hi there.


Report •

#7
July 21, 2014 at 07:08:19
"Foregoing all that, "everyone" will tell you we're moving to a cloud and phone/tablet model like it's the 1970's. That means if you want to write software that'll stand the test of time, you should be looking at Android and Linux. I'm not seeing this myself, but I'd be doing you a disservice if I didn't provide a warning."

That's true for personal usage (smartphone), but in the corporate world, Windows is still the king. Actually, smartphones itself are not competition, since they provide usage OUTISDE of cabled network environments. If you sit a desk, with a network cable on, what are you going to do with a smartphone ? It even hasn't got a keyboard ...

IF, and only then, IF new "computers" are made, that use the same OS that smartphones use, and then all the corporate world starts using those computers (that do not exist yet ?), then we start talking. But, maybe the Cloud era may already have ended, by the time that occurs. If ever actually, Windows may still be king in 2025. Let's wait some time. I'll be funny to read this in the future. Maybe you need to explain the word "Cloud", because nobody will knows what it mean then. It's just a different name for a server. You know, client/server, the system that was invented 50, 60 or 70 years ago.

Hi there.


Report •

#8
July 21, 2014 at 08:26:28
You know, the "50, 60, or 70 years ago" remark made me look up when the Teletype 33 came out. 51 years ago. I feel old.

In general, the usage of server vs. cloud depends on the ratio of engineers to marketing/management in the room, but technically a server is a physical thing that (sometimes) does stuff. The cloud is a service provided by a third party. That's the important distinction. People have no problems paying every month for a service, but they tend to gawk at paying every month for something they already bought.

As for phones replacing PCs, people gave the same arguments against PCs replacing mainframes and minicomputers back in the 80's. Look, what do you need your phone to do for light productivity work? A bigger screen, better input devices, and decent productivity software. Input devices are easy; phones have bluetooth, and there are bluetooth keyboards/mice that work with iOS/Android.

Displays are almost there. Right now, you can buy an adapter to connect your iPhone to an external display. Intel's pushing WiDi, for better or worse. We really just need these things to have enough horsepower to properly push the increased pixels fast enough. Then again, we could just make the screen larger and call it a tablet.

Productivity software? Microsoft's working on it. The business world runs on Microsoft Office, so this category all comes down to how good of a job they can do.

The biggest selling point of (Windows) laptops is centralized management, and they're working on that as well.

It ultimately comes down to price and convenience. Whichever form factor is cheaper without being too inconvenient will become the dominate player, with the other filling out the missed niches. I don't think one will completely replace the other because they have slightly different markets. (I am now tempted to get Win2012 on my Surface Pro, but that's besides the point.) The industry says demand will increase for the mobile OS and web languages, while decrease for the established PCs.

The important thing to realize is you're in the technology industry. Technology is all about change. Nothing's sacred, nothing lasts, so enjoy the ride.

How To Ask Questions The Smart Way


Report •

Ask Question