如何调用 C 例程lseek
or ftell
or fseek
?我试过这个(macos 10.12.6):
import os
#flag -lsystem
#include <unistd.h>
seeker.v:150:11: error: unknown function: C.lseek
148 | // tell returns the current file position
149 | fn (f os.File) tell() int {
150 | return C.lseek(f.fd, 0, C.SEEK_CUR)
151 | }