Message274063
I am having the same error as described by https://bugs.python.org/issue19153 and http://bugs.python.org/issue4434. My shared library is unable to import the Python module I created. I am attaching my C file which calls the python function Rough.py, whose code is written as under:
import math
def WallRough(*wss):
size=len(wss)
result=[0 for i in range(size)]
for i in range(size):
wss_mag=math.sqrt(wss[i][0]*wss[i][0]+wss[i][1]*wss[i][1]+wss[i][2]*wss[i][2])
result[i]=1
return result
I am using the following for compilation and linking:
gcc -fPIC *.c -I-I/usr/local/include -I/usr/local/include -I/usr/local/include/python3.4m -I/usr/local/include/python3.4m -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DDOUBLE_PRECISION -L/usr/local/lib -lpthread -ldl -lutil -lm -lpython3.4m -Xlinker -export-dynamic /usr/local/lib/libpython3.4m.so /usr/local/lib/libpython3.4m.a -shared -o librough30.so |
|
Date |
User |
Action |
Args |
2016-08-31 19:37:41 | suzaku | set | recipients:
+ suzaku |
2016-08-31 19:37:41 | suzaku | set | messageid: <1472672261.94.0.275046869498.issue27920@psf.upfronthosting.co.za> |
2016-08-31 19:37:41 | suzaku | link | issue27920 messages |
2016-08-31 19:37:41 | suzaku | create | |
|