Code Blocks "It seems like project has not been built yet. Do you want to build it now?"

22,273

Solution 1

What if I tell you that you should build your program to run it?

Wikipedia says:

In the field of computer software, the term software build refers either to the process of converting source code files into standalone software artifact(s) that can be run on a computer, or the result of doing so. One of the most important steps of a software build is the compilation process where source code files are converted into executable code.

It may be possible that your compiler is not linked properly to C::B or many other errors will be shown after you try to build your project, but for now (unless you post any build log) - you have to build your application in order to run it.

Solution 2

Solved , Anti-virus was deleting the .exe file for some reason. I put the project file folder in the "exclusion list" of anti-virus (or you can deactivate the anti-virus)

Solution 3

In CodeBlocks when a program is part of a project, it needs to built so that the compiler puts together all of the individual parts of the project. If you do not want it, just make it a stand-alone program by opening it out of the project.
Pressing F9 would do just fine.

Solution 4

This happens if you add a New File to the project and try to build-run the code.

The solution is to create a new file outside the project and then right-click on the tab (where the name of the file writes, followed by .cpp) and select Add file to active project. In the pop-up GUI, check the Debug and Release options and hit OK. Now if you build and run, you will no longer have the message saying “It seems like project has not been built yet. Do you wan to build it now?”.

Share:
22,273
Athul
Author by

Athul

Updated on January 30, 2020

Comments

  • Athul
    Athul over 4 years

    Code blocks bee working fine for me. But yesterday whenever I try to compile a small program a window appears showing

    It seems like project has not been built yet. Do you wan to build it now?

    I also found similar questions but in all of them not a single program is working. But in mine "hello world!" program and some other programs are working.

    This is the code:

    #include <iostream>
    using namespace std;
    
    void print(int b[], int s);
    
    int main()
    {
        int a[5] = {1,2,3,4,5};
        print(a, 5);
    }
    
    void print(int b[] , int s){
    
        for(int i = 0; i < s; i++){
    
            cout << b[i] << endl;
        }
    }
    

    I installed code blocks in another computer and it's working fine.

    I'm still learning C++.

  • Athul
    Athul over 7 years
    If I run the Hello world program it runs without any error.Also if I change the array size from a[5] to a[3] same program works fine
  • Athul
    Athul over 7 years
    I compiled the program(using build and run button-one with a gear and play button). It works fine in my other computer.
  • mtszkw
    mtszkw over 7 years
    @Athul, so what's the problem? Does your program compile and run?
  • Athul
    Athul over 7 years
    NO it isn't running. Every time i try to build and run , this dialogue box appears and it returns to the program for both Yes and No. It runs on my other pc. Why isn't it running for a[5]????
  • mtszkw
    mtszkw over 7 years
    Does any log appear?
  • Athul
    Athul over 7 years
    Nop, I'm not at home now. I can check again when I get home
  • mtszkw
    mtszkw over 7 years
    Add return 0; at the end of your not working program and reply.