compiling error: ELF file's phentsize not the expected size 
Author Message
 compiling error: ELF file's phentsize not the expected size

I try to wrapp c++ with python using the boost libraries.

but I got some errors, when trying to import the .so created.

Traceback (most recent call last):
  File "./boost.py", line 2, in ?
    import getting_started1
ImportError: ./getting_started1.so: ELF file's phentsize not the
expected size

can somebody help?

here's my compilation command:
g++3 getting_started1.cpp  -c -fPIC -shared  -o getting_started1.so
-I/usr/local/lib/python/boost_1_28_0/ -I /usr/include/python2.1/

here's my getting_started1.cpp file:
#include <boost/python/class_builder.hpp>
namespace python = boost::python;
#include <string>

namespace { // Avoid cluttering the global namespace.

  // A couple of simple C++ functions that we want to expose to
Python.
  std::string greet() { return "hello, world"; }
  int square(int number) { return number * number; }

Quote:
}

BOOST_PYTHON_MODULE_INIT(getting_started1)
{
    // Create an object representing this extension module.
    python::module_builder this_module("getting_started1");

    // Add regular functions to the module.
    this_module.def(greet, "greet");
    this_module.def(square, "square");

Quote:
}



Sat, 27 Nov 2004 23:45:59 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. elf error compiling tcl7.4

2. Curious 'File Not Found' Error

3. Help: Python1.4b won't compile on ELF-Linux

4. is not an ELF file ??????

5. ITS NOT A VIRUS, ITS A 404 ERROR, FILE NOT FOUND

6. ITS NOT A VIRUS, ITS A 404 ERROR, FILE NOT FOUND

7. file size 'mystery'

8. Intermittant Error 37 File Not Open Error on Network

9. Bigger than expected .exe file size?

10. error: operands not same size

11. compile error '--with-cxx=c++'

12. expect file size > 80kb mail

 

 
Powered by phpBB® Forum Software