Author Topic: 'Run' and Run part of 'Build and Run' not working...  (Read 22762 times)

Offline MaxLondon

  • Multiple posting newcomer
  • *
  • Posts: 12
'Run' and Run part of 'Build and Run' not working...
« on: April 19, 2010, 03:47:29 pm »
I'm running CB Nightly Build SVN 6181 on WinXP SP3 and I can't run any project from within CB.

Build works fine, exe is created, and I can run the exe from the explorer or cmd, but it doesn't work from CB. Switching on 'Console Application'/'Pause after execution ends' doesn't  change anything. Just nothing happends.

Is this a configuration issue or a bug?

Any help appreciated! Thanks.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #1 on: April 19, 2010, 03:52:39 pm »
Probably there are missing libraries (dlls). Please post the full build log or a simple project

devs: do you know if it is possible to display error message (in the log) with the reason why an executable can't be run?
At the moment the message is something like: "the executable: at_path can't be run"
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MaxLondon

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #2 on: April 19, 2010, 07:19:16 pm »
Probably there are missing libraries (dlls). Please post the full build log or a simple project

The target exe(s) run fine, compile and linking works. It is *NOT* an issue with the target exe not working. It must have something to do with CodeBlocks invoking the exe.


Offline jajdoo

  • Single posting newcomer
  • *
  • Posts: 4
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #3 on: April 20, 2010, 08:19:49 pm »
tell you what, i was having the EXACT same problem just this morning ( i decided to migrate my Ogre3d project from VC to C::B.. that damned Microsoft fiend finally pushed me to my limits)

I'll be guessing you are running in debug mode. if that is the case, go to build options->compiler settings-> Produce debugging symbols (in the list of compiler flags).

-> rebuild your project (for flags to take effect)

i have no idea why that worked (no logical reason)..

if that's not the case, well good luck  :?

EDIT:
one more thing i remembered doing: in project properties -> build target -> execution working dir : check if its pointing to the folder where the exe is actually located...
« Last Edit: April 21, 2010, 09:58:11 am by jajdoo »

Offline MaxLondon

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #4 on: April 21, 2010, 06:33:38 pm »
Thanks for trying, but unfortunately for me this does not fix the problem.

Debugging works. Running ([Build]->[Run]) does NOT work..
[Execution working dir] is set correctly, I tried relative and absolute path. Neither works for me.


Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #5 on: April 21, 2010, 08:45:19 pm »
could be a number of reasons especially on newer os like vista and windows 7

one i had a load of gripe with was DEP or data execution prevention basically blocking calls from other programs, another was permissions on windows 7 especially on 64 bit win 7 anything i as a user
installed in program files needed some special permissions or it would block execution.

do you get any createprocess errors ?




Offline jajdoo

  • Single posting newcomer
  • *
  • Posts: 4
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #6 on: April 21, 2010, 08:56:54 pm »
funny thing - i cant debug at all, but i can run  :P
i think together we have one functioning C::B eh?

Offline MaxLondon

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #7 on: April 22, 2010, 04:39:22 pm »
I'm running on WinXP with admin rights, so no Vista/Win7 with UAC or user rights issue

I don't see any error message/popup etc. Just does 'nothing', when I click the button or select the menu entry.

Does CB create a log somewhere?

@jajdoo: did you check that you have GDB installed correctly, etc?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #8 on: April 22, 2010, 07:01:02 pm »
I have not read all the messages; but, did anyone suggest the basics thing to check?

Project -> Set Program arguments
  Check value of everything
and also
Project -> Properties -> Build Target
  Check value of "Output Filename" and "Execution working directory"

NOTE: For many things to work in Code::Blocks a project must exist and best to save it at least once before running or debugging.

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 MaxLondon

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #9 on: April 27, 2010, 01:41:52 pm »
Project -> Set Program arguments
  Check value of everything
and also
Project -> Properties -> Build Target
  Check value of "Output Filename" and "Execution working directory"

I checked this several times and to no avail.

BUT after a reboot everything WORKS... strangely... although I restarted CodeBlocks several times before, which didn't help.

So the problem is "solved". Unfortunately I don't know what the real cause for the problem was.

Thanks for trying to help.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #10 on: April 27, 2010, 01:48:26 pm »
The re-boot fix means, it is likely your EXE was already running in a non-responsive state.

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 MaxLondon

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #11 on: April 27, 2010, 03:11:33 pm »
I doubt that, as I (at least) triple checked in the task-manager that there was no running instance.

I could also start the .EXE using explorer or from cmd without a problem, and several instance in parallel.

If it comes up again (hope it doesn't ;-) I will check for a running process.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #12 on: April 27, 2010, 09:28:16 pm »
You should also check for gdb.exe if running with debugger.
I would also check for gcc/g++/ld tasks.

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 barbourwill

  • Single posting newcomer
  • *
  • Posts: 3
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #13 on: November 13, 2010, 10:38:42 am »
I have exactly the same problem. Codeblocks was working fine for past week and now suddenly the IDE is incapable of invoking the executable that is created -> I just see a blank build log window. The compile and build works fine - I can successfully run the exe, just not from within the codeblocks ide.

I have tried restarting/re-installing codeblocks/ deleting the user config file all to no avail!

Anyone have any clues?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: 'Run' and Run part of 'Build and Run' not working...
« Reply #14 on: November 13, 2010, 10:52:04 am »
I have exactly the same problem. Codeblocks was working fine for past week and now suddenly the IDE is incapable of invoking the executable that is created -> I just see a blank build log window. The compile and build works fine - I can successfully run the exe, just not from within the codeblocks ide.

I have tried restarting/re-installing codeblocks/ deleting the user config file all to no avail!

Anyone have any clues?

Which OS and which version of C::B ?