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 can it compile on windows? #29

Closed
monkeywq opened this issue Nov 7, 2023 · 3 comments
Closed

How can it compile on windows? #29

monkeywq opened this issue Nov 7, 2023 · 3 comments

Comments

@monkeywq
Copy link

monkeywq commented Nov 7, 2023

Thanks for your project. It is very nice for junior developers to learn network and C programming.One more question I think it is better if the "smallchat" can run or compile on windows. Because most of our junior developers program on windows ^_^!

@xiao-yang25
Copy link

xiao-yang25 commented Nov 7, 2023

One way is to use a virtual machine, of course, if you find it troublesome, you can use an emulated terminal.Here I introduce a tool that I use in practice.

First, you need to download Cygwin.

Remember, you need to select additional git,ssh,vim,gcc/make, telnet/netcat or other packages you need during installation, which will be used for compilation and operation later.

Then, fork the code, create ssh key in Cygwin and add it to your github. After that, you can clone it to Cygwin and create a branch.

Next you can choose to use 'make' or 'gcc smallchat.c -o smallchat` to compile the code.

Finally, open a window first to run ./smallchat under the folder where the executable file is located.Then open two other windows, run nc localhost 7711, and use /nick yourname to modify the nickname respectively, and now you can speak freely in the chat room.

@WSEmma
Copy link

WSEmma commented Nov 7, 2023

Maybe you can simply use WSL!
https://learn.microsoft.com/en-us/windows/wsl/install

@monkeywq
Copy link
Author

monkeywq commented Nov 8, 2023

One way is to use a virtual machine, of course, if you find it troublesome, you can use an emulated terminal.Here I introduce a tool that I use in practice.

First, you need to download Cygwin.

Remember, you need to select additional git,ssh,vim,gcc/make, telnet/netcat or other packages you need during installation, which will be used for compilation and operation later.

Then, fork the code, create ssh key in Cygwin and add it to your github. After that, you can clone it to Cygwin and create a branch.

Next you can choose to use 'make' or 'gcc smallchat.c -o smallchat` to compile the code.

Finally, open a window first to run ./smallchat under the folder where the executable file is located.Then open two other windows, run nc localhost 7711, and use /nick yourname to modify the nickname respectively, and now you can speak freely in the chat room.

sure,I have make it successd. Thanks for your recommendation!

@monkeywq monkeywq closed this as completed Nov 8, 2023
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

3 participants