【发布时间】:2020-05-28 14:16:57
【问题描述】:
如何调用 C 例程 lseek 或 ftell 或 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 | }
【问题讨论】:
标签: vlang