Rustのクレートweb-viewがmacOSで動かない
やりたい事:自作言語StackGUIをmacOSで動かしたい
ソースコード:https://github.com/stack-community/stack-gui
バージョン
- macOS Ventura 13.6.7
- Rust 1.78.0 (54d8815d0 2024-03-26)
エラー
Compiling webview-sys v0.6.2
The following warnings were emitted during compilation:
warning: webview-sys@0.6.2: webview_cocoa.c:57:6: error: call to undeclared function 'webview_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
warning: webview-sys@0.6.2: if (webview_init(wv) != 0) {
warning: webview-sys@0.6.2: ^
warning: webview-sys@0.6.2: webview_cocoa.c:57:6: note: did you mean 'webview_exit'?
warning: webview-sys@0.6.2: ./webview.h:37:18: note: 'webview_exit' declared here
warning: webview-sys@0.6.2: WEBVIEW_API void webview_exit(webview_t w);
warning: webview-sys@0.6.2: ^
warning: webview-sys@0.6.2: 1 error generated.
error: failed to run custom build command for `webview-sys v0.6.2`
Caused by:
process didn't exit successfully: `/Users/kajizukataichi/Desktop/repositories/stack-gui/target/debug/build/webview-sys-8975268c30bac485/build-script-build` (exit status: 1)
--- stdout
cargo:rustc-link-lib=framework=Cocoa
cargo:rustc-link-lib=framework=WebKit
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("0")
HOST = Some("x86_64-apple-darwin")
cargo:rerun-if-env-changed=CC_x86_64-apple-darwin
CC_x86_64-apple-darwin = None
cargo:rerun-if-env-changed=CC_x86_64_apple_darwin
CC_x86_64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
cargo:rerun-if-env-changed=CFLAGS_x86_64-apple-darwin
CFLAGS_x86_64-apple-darwin = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_apple_darwin
CFLAGS_x86_64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-apple-darwin
CFLAGS_x86_64-apple-darwin = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_apple_darwin
CFLAGS_x86_64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-apple-darwin
CFLAGS_x86_64-apple-darwin = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_apple_darwin
CFLAGS_x86_64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:warning=webview_cocoa.c:57:6: error: call to undeclared function 'webview_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
cargo:warning= if (webview_init(wv) != 0) {
cargo:warning= ^
cargo:warning=webview_cocoa.c:57:6: note: did you mean 'webview_exit'?
cargo:warning=./webview.h:37:18: note: 'webview_exit' declared here
cargo:warning=WEBVIEW_API void webview_exit(webview_t w);
cargo:warning= ^
cargo:warning=1 error generated.
--- stderr
error occurred: Command env -u IPHONEOS_DEPLOYMENT_TARGET "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "--target=x86_64-apple-darwin" "-mmacosx-version-min=13.3" "-I" "webview.h" "-Wall" "-Wextra" "-x" "objective-c" "-std=c11" "-w" "-DDEBUG" "-DOBJC_OLD_DISPATCH_PROTOTYPES=1" "-o" "/Users/kajizukataichi/Desktop/repositories/stack-gui/target/debug/build/webview-sys-db61bff7e3070bd3/out/d1fba762150c532c-webview_cocoa.o" "-c" "webview_cocoa.c" with args cc did not execute successfully (status code exit status: 1).
Cargo.toml:
name = "stack-gui"
version = "0.1.0"
edition = "2021"
[dependencies]
opener = "0.6.1"
rand = "0.8"
regex = "0.1"
reqwest = { version = "0.11.0", features = ["blocking"] }
rodio = "0.17.3"
sys-info = "0.7.0"
clap = "3.0"
clipboard = "0.5"
rusty_audio = "1.4.1"
web-view = "0.7.3"
native-dialog = "0.5.4"
Windows10ではうまく動いてました。
どうすればよいでしょうか。
どなたか解決方法を教えてくださるとうれしいです。
0