Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT - Run or debug - the selection cannot be launched
CDT - Run or debug - the selection cannot be launched [message #231228] Fri, 06 March 2009 11:01 Go to next message
Eclipse User
Originally posted by: kgold.watson.ibm.com

Here's a FAQ with no answers on Google.

I can run or debug successfully by
Run - Open Run Dialog - Run
Run - Run History

If I try to run by
Clicking the Run icon
Ctrl-F11

I get

"The selection cannot be launched, and there are no recent launches"

Possibly related, the run history always shows the same name,
but does run whatever ran last.
Re: CDT - Run or debug - the selection cannot be launched [message #231236 is a reply to message #231228] Fri, 06 March 2009 11:17 Go to previous messageGo to next message
Eclipse User
Originally posted by: subs._nospam_consertum.com

Ken Goldman wrote:
> Here's a FAQ with no answers on Google.
>
> I can run or debug successfully by
> Run - Open Run Dialog - Run
> Run - Run History
>
> If I try to run by
> Clicking the Run icon
> Ctrl-F11
>
> I get
>
> "The selection cannot be launched, and there are no recent launches"
>
> Possibly related, the run history always shows the same name,
> but does run whatever ran last.
Try changing a preference:

Run/Debug
Launching
"Launch the selected resource"...

--
Derek
Re: CDT - Run or debug - the selection cannot be launched [message #231250 is a reply to message #231236] Fri, 06 March 2009 12:24 Go to previous messageGo to next message
Eclipse User
Originally posted by: kgold.watson.ibm.com

Derek wrote:
> Ken Goldman wrote:
>> Here's a FAQ with no answers on Google.
>>
>> I can run or debug successfully by
>> Run - Open Run Dialog - Run
>> Run - Run History
>>
>> If I try to run by
>> Clicking the Run icon
>> Ctrl-F11
>>
>> I get
>>
>> "The selection cannot be launched, and there are no recent launches"
>>
>> Possibly related, the run history always shows the same name,
>> but does run whatever ran last.
> Try changing a preference:
>
> Run/Debug
> Launching
> "Launch the selected resource"...

Thanks for responding, Could you give a bit more detail?

- I don't have a Run/Debug menu selection.
- I have Run, but there's no Launching under it
- Right clicking the project -> Properties yields a Run/Debug Settings
selection, but Launch Configurations is empty.

This is Eclipse 3.3.2 on Windows, if that matters.
Re: CDT - Run or debug - the selection cannot be launched [message #231258 is a reply to message #231250] Fri, 06 March 2009 12:43 Go to previous messageGo to next message
Eclipse User
Originally posted by: subs._nospam_consertum.com

Ken Goldman wrote:
> Derek wrote:
>> Ken Goldman wrote:
>>> Here's a FAQ with no answers on Google.
>>>
>>> I can run or debug successfully by
>>> Run - Open Run Dialog - Run
>>> Run - Run History
>>>
>>> If I try to run by
>>> Clicking the Run icon
>>> Ctrl-F11
>>>
>>> I get
>>>
>>> "The selection cannot be launched, and there are no recent launches"
>>>
>>> Possibly related, the run history always shows the same name,
>>> but does run whatever ran last.
>> Try changing a preference:
>>
>> Run/Debug
>> Launching
>> "Launch the selected resource"...
>
> Thanks for responding, Could you give a bit more detail?
>
> - I don't have a Run/Debug menu selection.
> - I have Run, but there's no Launching under it
> - Right clicking the project -> Properties yields a Run/Debug Settings
> selection, but Launch Configurations is empty.
>
> This is Eclipse 3.3.2 on Windows, if that matters.
>
I said a *preference* not a property. Windows->Prefrences

--
Derek
Re: CDT - Run or debug - the selection cannot be launched [message #231267 is a reply to message #231258] Fri, 06 March 2009 13:00 Go to previous messageGo to next message
Eclipse User
Originally posted by: kgold.watson.ibm.com

Derek wrote:
>>> Try changing a preference:
>>>
>>> Run/Debug
>>> Launching
>>> "Launch the selected resource"...
>>
>> Thanks for responding, Could you give a bit more detail?
>>
>> - I don't have a Run/Debug menu selection.
>> - I have Run, but there's no Launching under it
>> - Right clicking the project -> Properties yields a Run/Debug Settings
>> selection, but Launch Configurations is empty.
>>
>> This is Eclipse 3.3.2 on Windows, if that matters.
>>
> I said a *preference* not a property. Windows->Prefrences

Found it.

Under Launching,
'Launch the selected resource' is selected.
'Launch the associated project' is selected.

Under Default Launchers, it's empty

Under Launch Configurations, everything is selected except
Filter checked launch configuration types.

[To the developers: I can appreciate the incredible flexibility of the
properties and preferences, but it sure would make sense to me for the
Run button to run the program by default.]
Re: CDT - Run or debug - the selection cannot be launched [message #231287 is a reply to message #231267] Sat, 07 March 2009 00:02 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1336
Registered: July 2009
Senior Member
Ken Goldman wrote:

> Derek wrote:
>>>> Try changing a preference:
>>>>
>>>> Run/Debug
>>>> Launching
>>>> "Launch the selected resource"...
>>>
>>> Thanks for responding, Could you give a bit more detail?
>>>
>>> - I don't have a Run/Debug menu selection.
>>> - I have Run, but there's no Launching under it
>>> - Right clicking the project -> Properties yields a Run/Debug Settings
>>> selection, but Launch Configurations is empty.
>>>
>>> This is Eclipse 3.3.2 on Windows, if that matters.
>>>
>> I said a *preference* not a property. Windows->Prefrences
>
> Found it.
>
> Under Launching,
> 'Launch the selected resource' is selected.
> 'Launch the associated project' is selected.
>

Select Always launch the previously launched application in the Launch
preferences

> Under Default Launchers, it's empty
>
> Under Launch Configurations, everything is selected except
> Filter checked launch configuration types.
>
> [To the developers: I can appreciate the incredible flexibility of the
> properties and preferences, but it sure would make sense to me for the
> Run button to run the program by default.]
Re: CDT - Run or debug - the selection cannot be launched [message #233219 is a reply to message #231287] Thu, 23 April 2009 13:47 Go to previous messageGo to next message
David Hart is currently offline David Hart
Messages: 4
Registered: July 2009
Junior Member
Thanks for posting this thread, I had exactly the same problem, and
discovered what I was doing wrong.

You need to highlight the project in the Project Explorer, not one of the
other project files, and then you can select Run -> Run As -> Local C/C++
Application

Wow, I don't believe I've answered a question on this forum with so little
experience in eclipse. This newsgroup rocks.
Re: CDT - Run or debug - the selection cannot be launched [message #754531 is a reply to message #233219] Wed, 02 November 2011 20:38 Go to previous message
Erundil  is currently offline Erundil
Messages: 2
Registered: October 2011
Junior Member
Not really helpful for me. I'm using Eclipse 3.7 (Indigo) and:
- found those preferences
- set them as you told (just switched from "Launch the selected resource..." to "Always launch the previously...")
but there is a problem...

When I use the triangle button to run it, "Run Configurations" window appears.
When I choose to "Run as...' there's "Launch failed. Binary not found." error.

Why wouldn't they create an IDE like e.g. Dev-Cpp? It's just write the code and click Compile&Run. No messing with the settings, and so on...
Previous Topic:Best way to stop the program to run?
Next Topic:Does not find include<iostream.h>
Goto Forum:
  


Current Time: Thu Aug 21 22:17:06 EDT 2014

Powered by FUDForum. Page generated in 0.02528 seconds