Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-09-05 15:19:57

Larry Evans wrote:

> Following the instructions similar to those for the glib example, my
> project-root.jam contains:

Remind me, what is 'glib example'?

> rule glib ( name )
> {
> obj $(name)_obj : $(name).cpp ;
> }

> glib test
> ;
> However, I got:
> bjam --v2 test
> gcc.jam:init-link-flags:toolset,condition= gcc , <toolset>gcc-4.1
> gcc.jam:init-link-flags:toolset,condition= gcc , <toolset>gcc-4.3_v
> notice: could not find main target test
> notice: assuming it's a name of file to create

You have defined rule (which is basically a function in jam-speak)
that calls the 'obj' rule. The obj rule is called with 'test_obj' as
the name, and create main target called 'test_obj'. There's no target
called 'test' declared.

Just calling a function does not automatically creates a main target.
There are just two ways to create a main target:

        - Call the targets.main-target-alternative
        - Call some existing rule that creates main target. That will
        will eventually call targets.main-target-alternative


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at