Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build on windows 10 #1

Open
Naginipython opened this issue Sep 13, 2024 · 3 comments
Open

How to build on windows 10 #1

Naginipython opened this issue Sep 13, 2024 · 3 comments

Comments

@Naginipython
Copy link

I am trying to use the quickjs_runtime crate in my project, and it works really well on linux (best I've used), but when I try to build for windows, the custom script for this fails. I tried to get GCC, since it stdout mentioned it, but to no avail.

error occurred: Command "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-O2" "-Z7" "-Brepro" "-W4" "-D_GNU_SOURCE" "-DCONFIG_VERSION=\"quickjs-ng-0.4.1\"" "-DCONFIG_BIGNUM" "-FoD:\\Documents\\GitHub\\js_rs_test\\target\\debug\\build\\hirofa-quickjs-sys-3ca1b89090c2287e\\out\\04a782c76559f00c-cutils.o" "-c" "D:\\Documents\\GitHub\\js_rs_test\\target\\debug\\build\\hirofa-quickjs-sys-3ca1b89090c2287e\\out\\quickjs\\cutils.c" with args cl.exe did not execute successfully (status code exit code: 2).

I can post full stderr if needed, but there is a lot there. Is there a C/C++ build step on Windows I'm unaware of?

@andrieshiemstra
Copy link
Member

andrieshiemstra commented Sep 15, 2024

Hi Naginipython,

I don't do anything on windows but afaik msvc doesn't work. can you use mingW?

See also HiRoFa/quickjs_es_runtime#45
and maybe
https://github.com/HiRoFa/quickjs_es_runtime/blob/master/.github/workflows/rust.yml#L27

@Naginipython
Copy link
Author

Thanks for the info! I didn't know much about swapping C compilers in rust, and didn't quite understand for a minute. I got it working, with the stable-x86_64-pc-windows-gnu toolchain, but am now in a pickle since Tauri needs MSVC, but quickjs_runtime needs GNU. Tough.

@andrieshiemstra
Copy link
Member

Ah yes, I see..

I'm working on updating the embedded quickjs-ng to 0.5.0 and then check if I can compile with msvc using their makefile. if so I'll see if i can update the script (or maybe even just use their makefile)

No promises...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants