I have currently 3 targets in every project. 2 real (release and debug) and one virtual (all, includes release and debug). Now i have to create two mor virtual targets in every project (for release anddebug) and include only those projects in the three virtual targets that compiles fine. I have to build only the virtual targets, and not the real ones. right?
Yes + yes. That's a common and convenient way to setup and organise targets. Note that a "virtual target" actually
does compile the real target(s) it s connected to, but only these - its like grouping.
Also, I don't know why some of your targets do not compile - but if they are for a different platform, you can also use the platform flag to exclude such targets from the build. C::B checks if the build is performed on a compatible platform and skips targets that are defined to be for another platform. The default settings is "All", so all targets are (by default) compatible with all platforms. For you, this might not be the case. So this may be an even easier / more intuitive solution.
Another option you have is to set these targets to a type named "commands only" which does no compilation at all then.
Why do the targets not build? Its pretty weird after all...