#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    4
    Rep Power
    0

    Boost Python and Eclipse PyDev problem


    Hi,

    When I try to run the practice code from the boost python tutorial in Eclipse's PyDev environment , I get the following error
    ImportError: Shared object "libboost_python.so.1.52.0" not found, required by "libhelloext.
    Despite including the path to that file in the environment variable LD_LIBRARY_PATH.
    I also copied the libboost_python.so.1.52.0 file in the same working directory of my python program
    Also I included the path to the file in Eclipse's Linked resources property field, same error

    This is the tutorial code I'm using
    Code:
    char const* greet()
    {
       return "hello, world";
    }
    
    #include <boost/python.hpp>
    
    BOOST_PYTHON_MODULE(libhelloext)
    {
        using namespace boost::python;
        def("greet", greet);
    }

    Eclipse code
    Code:
    import libhelloext
    
    print hello.greet()
    Tried this too
    Code:
    from libhelloext import *
    
    print hello.greet()
    Machine: Unix, boost 1.52, python 2.7
    Any suggestion? please
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,901
    Rep Power
    481
    Did you export LD_LIBRARY_PATH ? I'm using neither boost nor eclipse, but my first guess would be to try starting eclipse by commanding

    $ LD_LIBRARY_PATH=path:$LD_LIBRARY_PATH eclipse
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    4
    Rep Power
    0
    thanks for the reply.

    I set the value of LD_LIBRARY_PATH to the path of the missing file already

IMN logo majestic logo threadwatch logo seochat tools logo