Avatar
#if os(WASI) import WASILibc #else import Darwin #endif func fputs(_ string: String, file: UnsafeMutablePointer<FILE>) { _ = string.withCString { (cstr) in fputs(cstr, file) } } fputs("hello stdout", file: stdout) fputs("hello stderr", file: stderr)
12:08 PM
[1/3] Compiling app main.swift /Users/omochi/github/swiftwasm/carton/Tests/Fixtures/DevServerTestApp/Sources/app/main.swift:7:57: error: cannot find type 'FILE' in scope func fputs(_ string: String, file: UnsafeMutablePointer<FILE>) { ^~~~ /Users/omochi/github/swiftwasm/carton/Tests/Fixtures/DevServerTestApp/Sources/app/main.swift:13:6: error: extraneous argument label 'file:' in call fputs("hello stdout", file: stdout) ^ ~~~~~~ /Users/omochi/github/swiftwasm/carton/Tests/Fixtures/DevServerTestApp/Sources/app/main.swift:14:6: error: extraneous argument label 'file:' in call fputs("hello stderr", file: stderr) ^ ~~~~~~ Build completed successfully
12:08 PM
WASILibcFILE が無いみたい?どこ見ればいいんでしょう