News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Not building

Started by kashifgodil, February 06, 2021, 07:59:22 AM

Previous topic - Next topic

kashifgodil

I have a problem, the program i have made is not building, I don't see anything on the screen. Here is a program I'm trying to make. I'm trying to do it in C language. I'm a beginner. Can someone help me?

/* Prints a message on the screen */
#include <stdio.h>
main()
{
    printf("Just one small step for coders. One giant leap for");
    printf(" programmers!/n");
    return 0;
}


BlueHazzard

What is the problem? What do you do? What is your operating system? What compiler do you use?
Do you have a build log?
Read this:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

kashifgodil

#2
I'm on a windows 10 computer and using codeblocks. I'm trying to run the following program:

/* Prints a message on the screen */
#include <stdio.h>
main()
{
    printf("Just one small step for coders. One giant leap for");
    printf(" programmers!/n");
    return 0;
}

When I click run it says: "It seems that this file has not been built yet, Do you want to build it now"

So I say yes and nothing happens. When I click no a screen pops up with the following in it:

Process returned 32767 (0x7FFF)   execution time : 0.001 s
Press any key to continue.



BlueHazzard


Process returned 32767 (0x7FFF)   execution time : 0.001 s
Press any key to continue.

This is not the full build log...
Do you have a anti virus software? Add codeblocks and your project path to exceptions.
Do you have write permissions in your project path? Make sure your project path is somewhere in your documents and not on the C:\ drive directly

kashifgodil

I uninstalled and reinstalled CodeBlocks and when I open CodeBlocks it says:

Cant find compiler executable in your configured search path's for GNU GCC compiler.

I think this is the problem why my program is not able to build. But how do I solve this issue? Do I get rid of the antivirus I have and then reinstall CodeBlocks?

Is it the antivirus that could be causing this problem or is there another way to fix this problem?


rc30906

Go to Settings>Compiler>Toolchain Executables. Click the "auto-detect" button for Compiler Installation Directory. It should come back with C:\Program Files (x86)\CodeBlocks\MinGW. Click the OK button and try again.
If it still doesn't work, it's probably because the MinGW path and executable names do not marry up with the Code::Blocks defaults in the 20.03 Windows binaries auto-install package once the install is completed. You can meticulously go through everything and fix it, but...
Rather than continue to struggle with this, download the previous release (17.12) instead and it should work properly.

kashifgodil

Thanks a lot the problem is solved.