[C++-sig] Problems with link stage...

Jeff Holle jeff.holle at verizon.net
Thu Jan 29 02:33:32 CET 2004


trying to build a cpp test client of my python extension shared library, 
which uses boost.python.

I'm using linux with gcc v3.3, python v2.3.2, boost 04/01/26 CVS head.

I've successfully built a boost.python extension module and tested it 
with python.
Now I'm stuck at the link stage of an equivalent C++ client.

The problem is my link is failing with "unresolved references" like:
    PySequence_DelSlice'  
    PyNumber_InPlaceXor'  
    PyNumber_Subtract'    
    PyMem_Malloc'         
    PyComplex_RealAsDouble'
    PyModule_Type'        
    PySequence_DelSlice'  
    PyNumber_InPlaceXor'  
                      
They mostly emulate from the boost_python library.

In investigating what Python 2.3.2 gives to my linux system, I've only 
found that the likely cantigate is libpython2.3.a.
Including this library to my bjam file appears to have no affect.
My current Jamfile is:

    subproject cppTest ;
    import python ;
    exe cppTest
    :  # sources
      cppTest.cpp
    :  # requirements
      <lib>../../../Python-2.3.2/libpython2.3.a
      <include>/usr/local/include/python2.3
      <find-library>UMLModel <library-path>.
    :
      release
    ;

Could somebody tell me what I need to do to resolve this problem?

A more general question:
My experience with linux and gcc is much more limited to my windows 
programming background.
In windows, problems like this where the client of a dll gains an 
appetite  for resources used only by the dll points to a problem of the 
client code using something other than an abstract interface from the dll. 

I have modified my shared library to only use abstract interfaces.  Note 
this involves a simple class factory.  This procedure has not altered 
the linking problems that I have.

Does linux share this problem with windows, MSVC 6.0 sp5?







More information about the Cplusplus-sig mailing list