|
Boost-Build : |
Subject: Re: [Boost-build] order of include directories in python extension
From: Gevorg Voskanyan (v_gevorg_at_[hidden])
Date: 2011-02-22 17:19:38
John Reid wrote:
> Sorry I spoke too soon. It is not working. Compiling is fine. At runtime
> I get:
>
> ImportError:
> /home/john/Dev/MyProjects/PyICL/bin/gcc-4.4.3/debug/_pyicl_dynamic.so:
> undefined symbol: _Py_RefTotal
>
> I imagine this is something to do with getting the boost.python usage
> requirements wrong. Does anyone have a better solution to this problem
> than hard-coding all the usage requirements?
I have created an example which should put you on the track. Please see below,
and don't hesitate to come back if you have questions.
lib a : a.cpp : : : <include>foo <define>bar <link>static:<define>static_macro
<include>duplicate ;
import targets : generate-from-reference ;
import property-set ;
import project ;
rule collect_usage_reqs ( target_ref : properties * )
{
local result = [ generate-from-reference $(target_ref) : [ project.current ] : [
property-set.create $(properties) ] ] ;
local ps = $(result[1]) ;
return [ $(ps).raw ] ;
}
lib b : : <conditional>@a_usage_reqs ;
lib c : : <link>static <conditional>@a_usage_reqs ;
rule a_usage_reqs ( properties * )
{
local result = [ collect_usage_reqs a : $(properties) ] ;
ECHO $(result) ;
return $(result) ;
}
lib no_duplicate : : <conditional>@no_dup_a_usage_reqs ;
import set ;
rule no_dup_a_usage_reqs ( properties * )
{
local reqs = [ a_usage_reqs $(properties) ] ;
local result = [ set.difference $(reqs) : <include>duplicate ] ;
ECHO "After filtering:" ;
ECHO $(result) ;
ECHO ;
return $(result) ;
}
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk