[C++-sig] Re: boost.Python/Jam with shared libraries

Aaron Bentley abentley at panoramicfeedback.com
Wed Nov 10 15:51:50 CET 2004


John Meinel <john <at> johnmeinel.com> writes:

> # You might try this
> 
> extension pfengine
>    :# sources
>      pfengine.cpp
>    :
>       <library-path>../.libs
>       <find-library>panutil
>       $(BOOST_PYTHON_V2_PROPERTIES)
> ;
> 

Hi John,

Fancy meeting you here!

The eliminating-spaces route got rid of the errors, but find-library looks
cleaner.  Thanks.

So I'm much further along.  Now I'm trying to link in a static file.  It appears
to work, but then I get "symbol missing".

---begin Jamfile---
project-root ;

import python ;

# ----- getting_started2 -------

# Declare a Python extension called pfengine
extension pfengine
:  # sources
   pfengine.cpp
   #libraries
:
  <library-path>../.libs
  <find-library>panutil
  <find-library>pantemplate
  <find-library>panpdfgen
  <find-library>pancompile
  <find-library>panconsult
  <find-library>panelement
  <find-library>panlang
  <find-library>pancore
  <find-library>panexport
  <find-library>panreport
  <find-library>pancgi
  <find-library>chart
  <find-library>ecommerce
  <find-library>icuio
  <find-library>icudata
  <find-library>icutoolutil
  <find-library>icule
  <find-library>icui18n

  # requirements and dependencies for Boost.Python extensions
  <template>@boost/libs/python/build/extension
  ;

# Declare a test for the extension module
boost-python-runtest test2
    :  # Python test driver
    test_getting_started2.py
    # extension modules to use
    <pyd>pfengine ;

LinkLibraries pfengine : ../libpdf.a ;
# arch-tag: ae55dfed-2576-4667-953f-d7d8f777f7c4
---end jamfile---

---attempt to use---
>>> import pfengine
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: /home/abentley/programming/.libs/libchart.so.0: undefined symbol:
PDF_setrgbcolor_fill
>>> 
---

PDF_setrgbcolor_fill is provided by libpdf.a

Any help appreciated.

Aaron






More information about the Cplusplus-sig mailing list