How to solve the shared error problem in swig for ld -shared command ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swasthi
    New Member
    • Jan 2011
    • 1

    How to solve the shared error problem in swig for ld -shared command ?

    when i tried the following commands:
    swig -python example.i
    gcc -c example.c example_wrap.c -I/usr/include/python2.3
    ld -shared example.o example_wrap.o -o _example.so
    i get:
    relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC.
    how to resolve this
Working...