Hey everyone,
When i try to write any new c++ program and run it, it doesnt even build and a different one runs(the same one runs all the time). I use Quincy.

However, any of my old c++ programs work fine, just any new ones that i try to run give me this problem.

I kinda stopped writing programs and now that i want to start writing them again i ran into this problem that is starting to get me really frustrated.

What can i do?
Thanks in advance.

Dani AI

Generated

Symptom reported by — new C++ files appear to build but pressing Run launches the same older program or skips the build — usually means the IDE is executing a different binary than the one just edited or the newly-built binary is not being produced/overwritten. The existing replies point in useful directions; the checklist below gives concrete diagnostics that pin down where the mismatch happens.

  • Confirm the source file is actually part of the active project/target (files can be open in the editor but not included in the project tree).
  • Make sure all files are saved before building; unsaved edits will not be compiled.
  • Inspect the complete build output/log: look for the link step and the exact path shown for the produced executable (the log normally shows the full .exe path). If the link step is missing or the path differs from what the Run action uses, that identifies the problem.
  • Check the Run/Debug configuration or “startup”/active project setting — many IDEs let the Run button execute a configured command or a specific project; confirm that the configured command points to the freshly-built .exe.
  • Verify the .exe’s Date Modified in the output folder and run that executable directly from a terminal/Explorer to confirm which code actually executes.
  • If the .exe never updates despite a successful link message, investigate file locks, permissions or antivirus/quarantine that can prevent overwrite.

A quick isolation technique: create a minimal new project with one main.cpp that prints a short message, set it as the startup target and run it. If that runs as expected the problem is project-level (output path/naming or run config); if it still launches the old program the issue is likely the IDE’s run command or system path resolution.

These steps expand on points raised by , , , and and will typically reveal whether the root cause is “file not in project”, “wrong run target/path”, or “build not producing/overwriting the exe.”

Recommended Answers

All 7 Replies

Well, if your program doesn't build then why are you tring to run it? It won't run because the compiler didn't create the new *.exe file. You have to fix all the error messages before you will be able to run the program.

I don't have any kind of errors in these little test programs i am trying to run, i press 'build' and they build, and then i press 'run' and a different program runs.

Or
i can just directly press 'run' (like i always have done), but this time it skips the building part and goes directly to running the other program.

I never used Quency so I can't really help you with that. Install either Code::Blocks with MinGW or VC++ 2010 Express, both are free.

i didn't know much about quenchy.
but in Visual studio C++, same problems happened when you're opening few of the files in 1 workspaces. You have to make sure that it's only one file's working on each workspaces.

If you want to know more about compiling, linking and programming I really advice you to use g++ ( minGW in windows ) and a simple text editor. Linux is better than Windows in this sense ofcourse if you mind using it.

Only thing I could possibly think of, which could easily be wrong, would be to close the solution, copy and paste your entire program into a new project. The program you are trying to run could possibly be running with an older solution/project, I don't know.

Let us know when you get this fixed. Thanks

Something like this happened to me before. If it did not build successfully it will run last successful build i.e. you may have completely change the source code but you get errors so the old program is going to run. Another reason for this may be if you have more then one project open in the same time, it may run incorrect one. Try deleting the .exe file and building the program again

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.