Hi folks,
I've been trying to figure out how to wrap the following C functions = compress.c , compress.h.
I tried following the tutorials, but after creating the .pxd file I don't know what to do :|
From what I have understood this is the pxd file that I should have
cdef extern from "compress.h":
size_t compress(void *s_start, void *d_start, size_t s_len)
size_t decompress(void *s_start, void *d_start, size_t s_len, size_t d_len)
uint32_t checksum32(void *cp_arg, size_t length)
After this I have no clue what to do :|
Help would be great guys! =)
Edit:
Getting this error
~/essentials/pylzjb# gcc -I /usr/include/python2.6 -shared -o pylzjb.so pylzjb.c compress.c
/usr/bin/ld: /tmp/ccQLZTaG.o: relocation R_X86_64_32S against `_Py_NoneStruct'
can not be used when making a shared object; recompile with -fPIC
/tmp/ccQLZTaG.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
thanks anyway =)