Code::Blocks Forums

User forums => Help => Topic started by: PREngineer on February 26, 2017, 06:47:46 pm

Title: Program seems to compile but runs old version
Post by: PREngineer on February 26, 2017, 06:47:46 pm
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!
Title: Re: Program seems to compile but runs old version
Post by: blauzahn on February 26, 2017, 07:06:01 pm
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?
Title: Re: Program seems to compile but runs old version
Post by: PREngineer on February 26, 2017, 07:10:36 pm
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
Title: Re: Program seems to compile but runs old version
Post by: Jenna on February 26, 2017, 07:16:20 pm
Any antivirus-software (avast ?) ?
That is the main-cause for many issues, when creating and overwriting executables on windows.
Title: Re: Program seems to compile but runs old version
Post by: stahta01 on February 26, 2017, 07:18:04 pm
http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

The above is a hyper link please follow it and post a build log.
Please use rebuild instead of build!

Tim S.
Title: Re: Program seems to compile but runs old version
Post by: PREngineer on February 26, 2017, 07:42:31 pm
I dont have any antivirus software in my computer, except for windows defender.
Title: Re: Program seems to compile but runs old version
Post by: PREngineer on February 26, 2017, 07:46:25 pm
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.