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 compile on Windows. #10

Open
hpstep opened this issue Nov 3, 2023 · 14 comments
Open

How to compile on Windows. #10

hpstep opened this issue Nov 3, 2023 · 14 comments

Comments

@hpstep
Copy link

hpstep commented Nov 3, 2023

How to support compiling on windows?
I use llvm-mingw or winlibs.

@statulr
Copy link

statulr commented Nov 3, 2023

Try to get WSL (Windows Subsystem For Linux)

@statulr
Copy link

statulr commented Nov 4, 2023

@hpstep Lmk when you installed WSL and if that doesn't work (You need to install the dependencies btw)

@superswan
Copy link

As stated by @statulr you will need WSL to compile and run the program. The code is not portable to Windows since it is using libraries and system calls specific to *NIX systems. Socket programming on windows requires the winsock library. Maybe someone can make a Windows fork.

@MZalfred
Copy link

MZalfred commented Nov 4, 2023

If you're looking to use LLVM-MinGW or WinLibs to compile code on Windows, it's a bit different from using the standard MinGW or GCC compilers. You need to grab the latest release of LLVM-MinGW on GitHub or on the official LLVM-MinGW website

@fl54321
Copy link

fl54321 commented Nov 5, 2023

虚拟机上可以编译吗

@statulr
Copy link

statulr commented Nov 5, 2023

虚拟机上可以编译吗

Yes as long as the virtual machine runs a compatible OS (Recommended: Ubuntu)

@pifeifei
Copy link

pifeifei commented Nov 8, 2023

虚拟机上可以编译吗

cygwin 可以编译

编译后,这个怎么用啊

@statulr
Copy link

statulr commented Nov 8, 2023

虚拟机上可以编译吗

cygwin 可以编译

编译后,这个怎么用啊

抱歉,如果这个翻译很糟糕,我不会说普通话,但基本上,因为它有一个 MAKEFILE,你可以执行命令smallchat,我很确定,或者你必须执行 GCC 或任何其他编译器,然后运行输出文件。

@statulr
Copy link

statulr commented Nov 8, 2023

虚拟机上可以编译吗

cygwin 可以编译

编译后,这个怎么用啊

但老实说,我建议在 WSL 中执行此操作(之前已链接)

@pifeifei
Copy link

pifeifei commented Nov 9, 2023

虚拟机上可以编译吗

cygwin 可以编译
编译后,这个怎么用啊

抱歉,如果这个翻译很糟糕,我不会说普通话,但基本上,因为它有一个 MAKEFILE,你可以执行命令smallchat,我很确定,或者你必须执行 GCC 或任何其他编译器,然后运行输出文件。

image

cygwin 中装了 apt-cyg install netcat, 没有 nc 命令, 用 msys2 中的 nc 命令链接可以使用了

还有就是 这个里面的代码量很少,应该没有兼容问题, 也就用这个编译试试,结果成了

一直没用 wsl 是因为服务器用的 windows 2008 r2 和centos, 就没有 用 wsl 了

@statulr
Copy link

statulr commented Nov 9, 2023

cygwin 中装了 apt-cyg install netcat, 没有 nc 命令, 用 msys2 中的 nc 命令链接可以使用了

还有就是 这个里面的代码量很少,应该没有兼容问题, 也就用这个编译试试,结果成了

一直没用 wsl 是因为服务器用的 windows 2008 r2 和centos, 就没有 用 wsl 了

好吧,很高兴看到它有效!

@statulr
Copy link

statulr commented Nov 9, 2023

@antirez antirez changed the title How to support compiling on windows? How to compile on Windows. Nov 10, 2023
@mrchipset
Copy link

I have made a win32 porting at this repo. You may have a try.
Util now, there are still some non-blocking console input issue, if some one have any idea, please help.

@statulr
Copy link

statulr commented Nov 17, 2023

@antirez You can archive this issue now

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

7 participants