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

Cannot compile qjs in MinGW64 for windows... #325

Open
Honya2000 opened this issue Jun 26, 2024 · 3 comments
Open

Cannot compile qjs in MinGW64 for windows... #325

Honya2000 opened this issue Jun 26, 2024 · 3 comments

Comments

@Honya2000
Copy link

Hello,

Since i'm not able to use Visual Studio to compile qjs - today i tried to compile it in MinGW64 with gcc.

But i'm still not able to compile it.

It throws error:
gcc -g -o qjsc .obj/qjsc.o .obj/quickjs.o .obj/libregexp.o .obj/libunicode.o .obj/cutils.o .obj/quickjs-libc.o .obj/libbf.o -lm -ldl -lpthread
C:/Projects/Tools/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -ldl: No such file or directory
collect2.exe: error: ld returned 1 exit status

I tried to enable CONFIG_WIN32 in Makefile. But it doesn't fix problem.
Also i didn't find any detailed instructions how to do this.

@Honya2000
Copy link
Author

I tried to remove all references to qjsc from Makefile but it still fails:

$ make
c -o repl.c -m repl.js
process_begin: CreateProcess(NULL, c -o repl.c -m repl.js, ...) failed.
make (e=2): The system cannot find the file specified.
make: [repl.c] Error 2 (ignored)
x86_64-w64-mingw32-gcc -g -Wall -MMD -MF .obj/repl.o.d -Wno-array-bounds -Wno-format-truncation -fwrapv -D_GNU_SOURCE -DCONFIG_VERSION="2024-02-14" -DCONFIG_BIGNUM -D__USE_MINGW_ANSI_STDIO -O2 -c -o .obj/repl.o repl.c
process_begin: CreateProcess(NULL, x86_64-w64-mingw32-gcc -g -Wall -MMD -MF .obj/repl.o.d -Wno-array-bounds -Wno-format-truncation -fwrapv -D_GNU_SOURCE -DCONFIG_VERSION="2024-02-14" -DCONFIG_BIGNUM -D__USE_MINGW_ANSI_STDIO -O2 -c -o .obj/repl.o repl.c, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [.obj/repl.o] Error 2

@Honya2000
Copy link
Author

Looks like qjsc is used to compile repl.c, which is used to compile qjs. So since i cannot compile qjsc under windows, i cannot compile qjs as well. But why documentation said windows compilation is supported under mingw64 ?

@Honya2000
Copy link
Author

Ok, i finally was able to compile almost everything by using msys2 instead of mingw64.

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

1 participant