News:

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

Main Menu

'Run' and Run part of 'Build and Run' not working...

Started by MaxLondon, April 19, 2010, 03:47:29 PM

Previous topic - Next topic

MaxLondon

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.

oBFusCATed

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!]

MaxLondon

Quote from: oBFusCATed on April 19, 2010, 03:52:39 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.


jajdoo

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...

MaxLondon

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.


reckless

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 ?




jajdoo

funny thing - i cant debug at all, but i can run  :P
i think together we have one functioning C::B eh?

MaxLondon

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?

stahta01

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++.
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]

MaxLondon

Quote from: stahta01 on April 22, 2010, 07:01:02 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.

stahta01

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++.
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]

MaxLondon

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.

stahta01

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++.
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]

barbourwill

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?

Jenna

Quote from: barbourwill 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?

Which OS and which version of C::B ?