hello there,
i have been having some problems with dev c++. It just cant seem to compile my code.
It says source file not compiled when i try to run the "compiled" program.

Its like this;- i write my code (simple code stil beginner lol) and i go compile it by clicking compile. It does this with no problems however when i go "run"; it says source file not compiled.

I have tried reinstalling it a couple of times but it hasn't worked.

Anyway what are some good free compilers that i can use, other that devc++. Ive tried CodeBloks:: but i prefer not to use that. Oh yeah and i prefer not to use visual c++ 2008 express either (too big and exceeds my needs).

Im just looking for a "good" free compiler that runs on winVista.
So..any ideas?

-thanks

Dani AI

Generated

Short answer: that message means Dev-C++ did not produce a runnable .exe for the project you tried to run. As hinted, the IDE thinks the compile step failed (or never linked an executable), and as suggested a clean/rebuild can help. The problem is usually one of these: the IDE didn’t actually build the file you think it did, the linker failed, the executable was created somewhere else, or Windows (UAC/antivirus) blocked the created .exe.

Checklist to diagnose and fix (try items in order):

  1. Make sure the source file is saved before compiling.
  2. Use the IDE command that does both compile and link (the “Compile & Run” / “Build and Run” action) rather than only “Compile” or only “Run.”
  3. Inspect the compiler output/log pane after you build. Look for a linking step and for any error messages — even a single linking error stops the .exe from being created.
  4. Verify an .exe was created in the project folder. If you can’t find one, check that your project file actually includes the source you edited (files not added to a project won’t be part of the build).
  5. Move the project out of protected folders (avoid Program Files). On Vista UAC can prevent creation or overwriting of binaries. Use a writable folder like your Documents.
  6. Temporarily disable or check antivirus logs — some AV tools quarantine brand-new .exe files and make it look like the build didn’t happen.
  7. Do a full Clean / Rebuild (this removes old object files and forces a link), and confirm the IDE’s compiler path points to a working MinGW/GCC toolchain.

Quick isolation test (outside the IDE): compile from a command prompt to confirm the toolchain works:

g++ myfile.cpp -o myfile.exe

If that produces an .exe that runs, the problem is the IDE configuration. If the command fails, reinstall or update the MinGW/TDM-GCC toolchain. If problems persist, try a maintained Dev-C++ fork or a lightweight MinGW-based IDE to see whether the IDE itself is the culprit.

Recommended Answers

All 3 Replies

DevC++ works for most people here. Are you absolutely sure your code compiles without errors?

Yeap im 100% sure the codes correct. Because..it has worked on this same compiler before. but now it just doesn't seem to.

Its sort of like this; I write something, compile and run, and it works fine the 1st time.

then i go on to the next project compile and try to run but it doesnt work. It just says "source is not compiled"

Is it a bug or is it just random bad luck?

I'm not using Bloodshed, but it probably as a function like 'clean build' or 'Rebuild all'. You could try that when you open a new project.

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.