Author Topic: Codeblocks does not start the compiled executable  (Read 9389 times)

Offline UsYer

  • Single posting newcomer
  • *
  • Posts: 5
Codeblocks does not start the compiled executable
« on: October 14, 2009, 07:34:40 pm »
Hi,
i just upgraded my computer to windows 7 64 bit. Codeblocks remained on an older partition, which means i didn't reinstalled it after the upgrade, but it works pretty well except it doesn't start my executables after a build. Does anyone have an idea how i can fix this? The program is compiled succesfully and i can start it manually, but not right from the IDE.
Any help is appreciated.

UsYer

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Codeblocks does not start the compiled executable
« Reply #1 on: October 14, 2009, 10:21:09 pm »
Right click on the Code::Blocks exe file and try run as administrator or run in windows XP mode.

NOTE: Answer based on how Vista works; hopefully still the same in Windows 6.1 AKA Windows 7

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline UsYer

  • Single posting newcomer
  • *
  • Posts: 5
Re: Codeblocks does not start the compiled executable
« Reply #2 on: October 14, 2009, 11:11:26 pm »
Right click on the Code::Blocks exe file and try run as administrator or run in windows XP mode.

NOTE: Answer based on how Vista works; hopefully still the same in Windows 6.1 AKA Windows 7

Tim S.

Thanks for your answer but still no change. But i found out that debugging actually works. May be I could reinstall codeblocks over my old installation, hopefully fixing the issue. If anyone else has an idea, I'm happy to hear it.

UsYer

Offline Laethnes

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Codeblocks does not start the compiled executable
« Reply #3 on: August 12, 2011, 01:54:04 pm »
Although this topic is so long, it looks like this problem is not solved. And I have it too. Last month and half, I was programming and I also used Code::Blocks IDE. And everything was fine. But two days ago, I accidentally deleted directory with mingw compiler (it was in separate directory), so I installed it again (I didn't touch any file in code blocks) and now I have this problem. Program is compiled just fine and executable is where it should be (I deleted it to make sure) and I can run it with no problem, but hitting "run" or "build/run" in CB does not run it and does not print any error. But when I start debugging, it runs.

I tried reinstall Code::Blocks but it makes no difference. So is there any solution?
(I'm sorry for errors in my English - it isn't my native language)

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: Codeblocks does not start the compiled executable
« Reply #4 on: August 12, 2011, 03:40:24 pm »
First, we need to know what version of C::B you are using.
Second, more info, by example about C::B's logs could greatly help, too.

Offline Laethnes

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Codeblocks does not start the compiled executable
« Reply #5 on: August 14, 2011, 07:35:04 pm »
First, we need to know what version of C::B you are using.
Second, more info, by example about C::B's logs could greatly help, too.

Ah, I's so sorry, I totally forget provide such information: it's latest stable version downloadable from C::B webpages. Namely, 10.05.

About logs; if you mean logs in application, that that is the biggest problem; none are printed. That's why I wrote here at the first place; I had no pointer to help me find the problem.

But what is strange, it started working. Before, I tried reinstall CB, clear work (by deleting both obj directory and result executable), I restarted my computer, nothing worked. Then I wrote a message here, on forum, and began reinstall Qt, because I had some problems with it. I was playing with it for a time and totally forget I had this CB problem - run CB and it was able to run program normally. And after a few minutes, I realized I had this problem. So I have no clue, what I did...
(I'm sorry for errors in my English - it isn't my native language)

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: Codeblocks does not start the compiled executable
« Reply #6 on: August 15, 2011, 02:43:52 pm »
No log file in C::B's directory?
Maybe you can have some clues if you run C::B's from console, too.

It seem your problem started with re installation of mingw, are paths in C::B correct?

Offline Laethnes

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Codeblocks does not start the compiled executable
« Reply #7 on: August 15, 2011, 06:56:11 pm »
No log file in C::B's directory?
Maybe you can have some clues if you run C::B's from console, too.

It seem your problem started with re installation of mingw, are paths in C::B correct?

Log file: no, I do not see any log file in directory of CB.

Console: thanks for idea, I'll try it next time. When I work on GNU/Linux, I do it as one of the first attempts to solve the problem but on Windows I often forget, because almost all programs I had problem with didn't print anything when I tried...

Paths: I'm totally sure this wasn't the problem. Because as one of first steps of solving this, I deleted all obj files and also the executable one to be sure they're compiled, not reused. And executable WAS created; I run it manually and debugger was able to run it, too. Only button (and key shortcut) ignored it with no message.

Anyway, it happened again, but this time with other compiler (before, it was MinGW, this time it's MS VS 2008) but in this case I also know what problem was - I turned on opinion "treat warnings as errors", then unused function parameter generated warning which was converted to error which caused that linker failed - but C::B didn't notice that and after finishing closed log tab. But unlike previous case, this time these errors were still logged in log tab. But I thought I should write this here for others to help - in this case, problem was that "there was a problem not highlighted by CB which caused creating executable to fail".
(I'm sorry for errors in my English - it isn't my native language)