Author Topic: Select a target (baffled)  (Read 2461 times)

Offline johne53

  • Regular
  • ***
  • Posts: 253
Select a target (baffled)
« on: December 03, 2008, 01:00:18 pm »
A new project that I just created today has a problem that I never encountered before. It has the usual Release and Debug targets but when I attempt to debug it, a dialog box appears saying "Select target". This allows me to select from Debug or Release and it contains a checkbox saying "This target provides the project's main executable".

The only unusual thing in this case is that my workspace contains two projects that both build console apps (i.e. executables). Is that why I'm getting this unusual dialog box or have I forgotten to set something somewhere??

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9557
Re: Select a target (baffled)
« Reply #1 on: December 03, 2008, 02:00:40 pm »
a dialog box appears saying "Select target".
There could be 2 reason:
1.) You have setup a virtual target (e.g. "All") which includes the release and debug target. This virtual target is selected on build and/or run.
2.) You did not select the checkbox "This target provides the projects main executable" for one of the targets (which you don't have to, btw...)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Select a target (baffled)
« Reply #2 on: December 03, 2008, 02:29:54 pm »
Thanks for the hints. Eventually I found the problem by comparing my project file with some existing ones. In the "Project" section (of the XML file) my other projects all had this line:-

<Option default_target="Debug" />

This was missing from the new project. I added it in a text editor because I couldn't see exactly where to set that option. Anyway, the annoying dialog box has now gone.  :D

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9557
Re: Select a target (baffled)
« Reply #3 on: December 03, 2008, 05:09:38 pm »
<Option default_target="Debug" />
I couldn't see exactly where to set that option.
This one:
2.) You did not select the checkbox "This target provides the projects main executable" for one of the targets (which you don't have to, btw...)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ