Author Topic: Select target dialog issues  (Read 6787 times)

Offline OsminohejTygr

  • Multiple posting newcomer
  • *
  • Posts: 12
Select target dialog issues
« on: February 05, 2014, 12:58:57 pm »
Hi,

I have several problems with Select target dialog.

First one is when you build just one file (using context menu in Projects tab), it list all targets. If you choose target, that don't contain desired file, Codeblocks application crashes w/o any error message. It would be nice, if that list contains just targets with selected file on current platform.

Second one is after you build your project and you have Virtual target selected in tollbar, it asks, which target you want to run. In this case dialog also contains all targets. Also it would be nice to list only targets under selected Virtual target (possibly for current platform).

Last one is that you can select Virtual targets for other platforms in toolbar. It would be nice if Virtual targets witch contain target for other platform are also hidden (like normal targets). If Virtual targets suppose to contain targets for all/more platforms than you can hide Virtual targets that contains no target for current platform.

Otherwise thank you for great IDE :)

Windows 7 64
CB build 9605
« Last Edit: February 05, 2014, 01:30:40 pm by OsminohejTygr »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Select target dialog issues
« Reply #1 on: February 06, 2014, 09:07:24 am »
First one is when you build just one file (using context menu in Projects tab), it list all targets. If you choose target, that don't contain desired file, Codeblocks application crashes w/o any error message. It would be nice, if that list contains just targets with selected file on current platform.
This is fixed in trunk now, thanks for reporting.

Actually its also a user error: As a file can belong to several projects and within projects to several targets, C::B asks you what target to pick up for single file compilation to obtain the compiler and settings to use. If you pick a target this files does not belong to, C::B cannot decide what to do. Therefore you have to select a valid target, obviously.

But surely a wrong input should NOT crash C::B... :P

Concerning the other questions:

I'd rather leave it as it is. The reason is if you think about cross-compiling, a target platform not the same as the platform your are running on might still be a valid and compilable target,if you take cross-gcc on Linux for windows, for example. So anything in a direction of hiding targets would make cross-compiling impossible. The philosophy here is: Keep it simple. The list of targets is not be that large in the end, isn't it? :)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline OsminohejTygr

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Select target dialog issues
« Reply #2 on: February 06, 2014, 04:53:07 pm »
A agree it's also an user error, but it would be nice to get list of targets that "makes sence" in given context regarding platform or not (targets for selected file in build case/targets of selected virtual target in run case). Just for your consideration. No need to discuss this anymore. I understand this is thing #51261 on your list.

I was wondering about cross-compiling myself, since normal targets for other platforms are already hidden in toolbar (at least with my settings). Just thought it should follow same philosophy everywhere (to hide or not to hide :)). About large list of targets (12 in my case) I guess I can/should separate my project into multiple projects.

Anyway thank you for quick fix :) This is why I love C::B. You guys are the best ;)
« Last Edit: February 06, 2014, 05:09:33 pm by OsminohejTygr »