Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2004-04-08 06:38:00

"themadman74" <vmvaf0v02_at_[hidden]> writes:

> Hi,
> I am using jam that was compiled from the boost-jam-3.1.9 source code
> on Cygwin (as well as Linux). In trying out the example for modules
> in boost.jam document,, if I
> type into a Jamfile:
> module my_module
> {
> rule salute ( x ) { ECHO $(x), world ; }
> rule greet ( ) { salute hello ; }
> greet ;
> }
> my_module.salute goodbye ;
> I find that it gives an error of:
> ------
> hello, world
> Jamfile:7: in module scope
> rule my_module.salute unknown in module
> ------
> If someone could point out to me the correct way of getting modules to
> work, then I would appreciate it. I have tried going over thru the
> mailing list archives but didn't seem to find anything in regards to
> this boost-related enhancement to the original Jam.

You're working with the low-level "module" language feature but not
with the high-level Boost.Build module feature. When Boost.Build
imports a module, it looks up the file, includes it with module
$(name) wrapped around it, and then uses the IMPORT rule to copy
the non-local names from the module into prefixed names in the global



Dave Abrahams
Boost Consulting

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