1

enter image description hereI'm new in Codeblocks and programming world.

( Unsupported 16-Bit Application

The program or feature "\??C:\Users\Hossen\Desktop\C_Time\try\bin\Debug\Try.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. )

my Codeblocks showing this message and didn't print a single line. Recently I'm facing this problem. Any One help me to solve this problem, please?

#include <stdio.h> 
#include <stdlib.h> 
int main()
{
    int a, b, c, GCD;
    a = 10;
    b = 20;
    for (c = 1; c <= a && c <= b; c++)
    {
        if (a % c == 0 && b % c == 0)
        {
            GCD = c;
        }
    }
    printf("%d\n", GCD);
    return 0;
}
Breakpoint
  • 428
  • 6
  • 19
  • It would improve the question to show your code – M.M Feb 18 '20 at 06:03
  • Codeblocks is a front end for other compilers, primarily GCC. Check the compiler options and make sure someone's not smurfing with your head by setting the default compiler options to build 16 bit programs. If the compiler options look right, find out what compiler it is using and the version. – user4581301 Feb 18 '20 at 06:04
  • @M.M Here is my code #include #include int main() { int a, b, c, GCD; a = 10; b = 20; for(c = 1; c <= a && c <= b; c++) { if(a % c == 0 && b % c == 0) { GCD = c; } } printf("%d\n", GCD); return 0; } – Alomgir hossen Feb 18 '20 at 06:11
  • @user4581301 GNU GCC compiler and codeblocks-17.12mingw-setup – Alomgir hossen Feb 18 '20 at 06:24
  • Turn off your antivirus or windows defender, then do a rebuild – M.M Feb 18 '20 at 06:26
  • That certainly looks up to date. Not exactly certain what version of GCC comes bundles with it, but if it's before 4.9 I'll be surprised (and horrified). – user4581301 Feb 18 '20 at 06:26
  • @user4581301 How do i check my current GCC version? – Alomgir hossen Feb 18 '20 at 06:34
  • code blocks comes with a rubbish compiler, it would be better to install mingw-w64 – M.M Feb 18 '20 at 06:40
  • @M.M Build message mingw32-gcc.exe -Wall -g -c C:\Users\Hossen\Desktop\C_Time\Ary\main.c -o obj\Debug\main.o mingw32-g++.exe -o bin\Debug\Ary.exe obj\Debug\main.o Output file is bin\Debug\Ary.exe with size 28.48 KB Process terminated with status 0 (0 minute(s), 0 second(s)) 0 error(s), 0 warning(s) (0 minute(s), 0 second(s)) – Alomgir hossen Feb 18 '20 at 06:40
  • Nothing odd in that command line. What happens if you try to run the program yourself from a command prompt? Same thing? – user4581301 Feb 18 '20 at 06:43
  • @user4581301 When i run this code The cb_console_runner show this, message Unsupported 16-Bit Application The program or feature "\??C:\Users\Hossen\Desktop\C_Time\try\bin\Debug\Try.exe" cannot start or run due to incompatibity with 64-bit versions of Windows. Please contract the software vendor to ask if a 64-bit Windows compatible version is aviailable. – Alomgir hossen Feb 18 '20 at 06:47
  • [Instructions for installing a more up to date GCC tool chain.](https://stackoverflow.com/a/30071634/4581301). You'll have to consult the Code::Blocks documentation to see how you would hook Code::Blocks up with it, though. – user4581301 Feb 18 '20 at 06:51
  • Waaaait s sec: The command line is building *bin\Debug\Ary.exe*. Your error message references *\??C:\Users\Hossen\Desktop\C_Time\try\bin\Debug\Try.exe*. Looks a hell of a lot like the wrong program is being run. Don't run the program in or through Code::Blocks. We want to remove Code::Blocks from the equation.Open a command prompt and run your program directly from the command line. – user4581301 Feb 18 '20 at 06:55
  • After reinstall Codeblocks, I found some interesting fact, I can't print any double data type value. – Alomgir hossen Feb 21 '20 at 14:05

1 Answers1

1

The code looks ok, so I guess your installation is not correct.

As you are new, to keep it simple, you probably just should reinstall Code::Blocks.

Check you have the correct version downloaded before installing. (Supporting 64bit Operating Systems, not 32 Bits)

And then try installing it in Program Files.

Hope this will help.

s.blnc
  • 76
  • 6