A few days ago I started programming with C after programming with C++, however, my Windows Vista 64bit machine was unable to create a C project. I recompiled the code with the MinGW Dev-C++ compiler without issue.
However, when I ran the code I received the following error:
Unsupported 16-Bit Application
The program or feature
"\??\C:\Dev-Cpp\gcc.exe"
cannot start or run due to incompatibity with 64-bit versions of Windows. Please contact the software vendor to ask if a 64-bit Windows compatible version is available.
Is this a problem with compiling C code using a C++ compiler?
The error you're seeing is from using an ancient (as in 16-bit Windows 3.1 era) software that Windows 64-bit does not provide backwards-compatibility for. This has nothing to do with C or C++, just a really old compiler.
You can either install windows 7 with XP-mode, which provides a virtual 32-bit XP machine running nearly seamlessly under Windows 7, or some other 32-bit virtualization solution or download a newer version of gcc.exe or some other compiler that's less than 20 years old:
See cygwin, MingGW, or Visual Studio Express.
I got the same error message when accidentally adding the -c
switch which tells the compiler to not link the executable. Removing the switch made it work again.
> gcc --help
...
-c Compile and assemble, but do not link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With