Author Topic: Is it A Bug about "Build all"?  (Read 4027 times)

Offline nanyu

  • Almost regular
  • **
  • Posts: 188
  • nanyu
Is it A Bug about "Build all"?
« on: September 27, 2009, 10:52:24 am »
1- I Have a Workspace
2- the Workspace have two project: Project_1,Project_2
3- the Project-1 have three Targets: Debug (exe), Release (exe),  Dll

Q1, When I "build all", the IDE start build  Project_1 and Project_2,but when build Project_1, IDE always build the "DEBUG" target ONLY, even I have set  "DLL " as the active target of project_1.  why?

Q2, when set "Project's dependencies..",  How to set a Project dependencied on a  specific target of the other project ? Now, After I Set Project_2 dependencied on Project_1, it was meant the Project_2  dependencied on the "DEBUG" target of Project_1.

sorry for my english!

thks!
   


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Is it A Bug about "Build all"?
« Reply #1 on: September 27, 2009, 11:09:44 am »
You can not explicitely set dependencies between special targets.
Dependencies are set between projects.

If project2 depends on project1 and you build target Debug in project2 it will also build target Debug in project1 if necessary.
In other words, the dependant targets (real and/or virtual targets) have to have the same names in both projects.

If the real targets do not have the same name (and this can or should not be changed), you can also specify virtual targets, that contain the appropriate real targets, and build the virtual target (the dependencies also work for vtargets).

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Is it A Bug about "Build all"?
« Reply #2 on: September 27, 2009, 11:39:00 am »
You can not explicitely set dependencies between special targets.
Keep in mind that dependency bettween targets in a project is defined to: Targets will be build from top to bottom.
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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Is it A Bug about "Build all"?
« Reply #3 on: September 27, 2009, 11:50:12 am »
You can not explicitely set dependencies between special targets.
Keep in mind that dependency bettween targets in a project is defined to: Targets will be build from top to bottom.

More clearly:

You can not explicitely set dependencies between special targets in different projects.