Boost logo

Boost-Build :

From: Paolo Coletta (paolo_at_[hidden])
Date: 2007-01-04 20:40:26


Hi,
I need to include jni headers (from Java jdk) in some of my projects.
To avoid adding
      <include>/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/include/
      <include>/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/include/linux
in the specific projects (which makes the Jamfile non portable on
different PCs) the suggested solution seems to be to customize the
site-config.jam
Thus, I tried to change site-config as follows:

# siteconfig.jam
project site-config ;
lib jdk :
    : <include>/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/include/
      <include>/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/include/linux ;

and modified my Jamfile to use site-config//jdk:
# Jamfile
lib jni : [ glob ../../../src/jni/*.cpp ]

                        /site-config//jdk

                : <link>static ;

However, I get the following error:
error: Unable to find file or target named
error: '/site-config//jdk'
error: referred from project at
error: 'jni'

I also tried to use the syntax suggested in the doc
http://www.boost.org/doc/html/bbv2/recipies/site-config.html
i.e., I added the following two lines to site-config.jam
import project ;
project.initialize $(__name__) ;
but I get the same error. Anyway, I remember to have seen a msg in the
list (but I do not find it now) which said the above two lines should not
be needed anymore in ver 1.33.1.

I'm using boost 1.33.1 (and the bjam version therein).

Is there something wrong with this approach?

Thanks,
  Paolo


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