#Need to help with build app for windows on WSL2

5 messages · Page 1 of 1 (latest)

silk mango
#

I can't build app for windows on WSL2...
I get this error when running the command pnpm tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc
tauri info:

> tauri "info"


[✔] Environment
    - OS: Ubuntu 22.04 X64
    ✔ webkit2gtk-4.0: 2.44.0
    ✔ rsvg2: 2.52.5
    ✔ rustc: 1.78.0 (9b00956e5 2024-04-29)
    ✔ cargo: 1.78.0 (54d8815d0 2024-03-26)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 20.11.0
    - pnpm: 9.1.1
    - npm: 10.2.4
    - bun: 1.0.35

[-] Packages
    - tauri [RUST]: 1.6.7
    - tauri-build [RUST]: 1.5.2
    - wry [RUST]: 0.24.10
    - tao [RUST]: 0.16.9
    - tauri-cli [RUST]: 1.5.14
    - @tauri-apps/api [NPM]: 1.5.6
    - @tauri-apps/cli [NPM]: 1.5.14

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: React
    - bundler: Vite
vast copper
#

I don't recommend building tauri app inside wsl with msvc target.
It doesn't make sense - wsl used to build gnu programs and msvc is the official compiler of Windows (used outside of wsl)

Do you have specific reason to build inside wsl?

silk mango
#

Thank you very much for the answer, I mainly use wsl as my main working environment, although I am a windows user. And to be more precise, windows for games, wsl for work 😅

#

I've already tried to build an app using gnu, but I got the same error as in the screenshot

silver parcel
#

did you try building it with the --verbose flag to hopefully get more output?