Author Topic: Wrong target Compiled in Multi-Project Workspace  (Read 3471 times)

mejohnsn

  • Guest
Wrong target Compiled in Multi-Project Workspace
« on: February 24, 2006, 10:21:59 pm »
Hi guys-

I did a quick, simple-minded search in the CB Forums for a description of this problem, and didn't see one, so here goes....

I installed CB 1.0r2 just a few days ago (less than 10). I tried importing a project from Dev-Cpp, and creating a couple new projects using the "Create a New Project" feature on the "Start Here" display. The new projects were one console application, and one Win32GUI project.

But now here is what confuses me: how does CB decide with of these projects is the one you want to build when you press F9? I had the Win32GUI selected, and it did a build of the Dev-Cpp project. Likewise with running: I had one project selected, and its 'Default' target, but it ran the Default of another project.

Is 'Default' global? I expected, based on my experience with other IDEs, that it would be local to the Project.

Now if I keep on removing all other projects from the Workspace, so that there is only one Project in it, then it builds and runs correctly. But is this really the design?

TIA.

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Wrong target Compiled in Multi-Project Workspace
« Reply #1 on: February 24, 2006, 10:40:22 pm »
Right click on the project you want to build -> Activate project :)
Life would be so much easier if we could just look at the source code.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Wrong target Compiled in Multi-Project Workspace
« Reply #2 on: February 24, 2006, 10:42:55 pm »
If you press F9, the targets of the active project are built (it may be that you have only one target, but you can have several). Then the main executable is run.

The active project is the one whose title is shown in bold.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

mejohnsn

  • Guest
Re: Wrong target Compiled in Multi-Project Workspace
« Reply #3 on: February 25, 2006, 03:58:03 am »
Thanks to yop & thomas.

It threw me for a loop that 'Activate' shows up only if the project is not already activated, but that didn't take me too long to figure out;) So now I am much happier with the multi-project capability of CB.