News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Program seems to compile but runs old version

Started by PREngineer, February 26, 2017, 06:47:46 PM

Previous topic - Next topic

PREngineer

Im having this problem with codeblocks. Lets say i made a program and I compile and run it, than i decide to edit the program from the editor window, but when i try to compile and run the new version, it appears as it has compiled and it runs, but it runs the program i had before editing it. The only solution i have found is to copy the code, close codeblocks and open it again.
This happens periodically
Help?
Thanks!

blauzahn

Just to verify: Does your code reside within a project? If it does then when you trigger compilation
cb will usually save the modified code and call compiler and linker. Is it C/C++? Has the executable
program file been created after you started compilation?

http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

OS? compiler?

PREngineer

Its a project. Im writing in C and the problem happens when i edit the program and try to recompile it, so there has already been  an executable file created.
the OS is windows 10, updated.
dont know the compiler :/
GNU ?

thanks for your response

Jenna

Any antivirus-software (avast ?) ?
That is the main-cause for many issues, when creating and overwriting executables on windows.

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

PREngineer

I dont have any antivirus software in my computer, except for windows defender.

PREngineer

i just found out that its creating a file called main.c inside the program im creating, and that file main.c has the old code.