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 for Windows #4

Open
hamyyy opened this issue Aug 9, 2022 · 2 comments
Open

Cannot compile for Windows #4

hamyyy opened this issue Aug 9, 2022 · 2 comments

Comments

@hamyyy
Copy link

hamyyy commented Aug 9, 2022

When i try to build the project i get the following error:

src\main.c(30,10): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory

I'm using Windows 11, vscode with C/C++ Tools and CMake Tools extensions. I allow cmake to configure the project which it seems to do without a problem. But when I try to build I get the above compilation errors.
After searching I found that unistd.h (and possibly other header files) are specific to UNIX operating systems. I have run the project in WSL (Linux kernal on Windows) and it works fine. Maybe this project hasn't been ported to windows yet? Any help or insight into the matter is deeply appreciated.

Thank you :)

@hamyyy
Copy link
Author

hamyyy commented Aug 19, 2022

I've created a workaround by encapsulating the project in a docker container.

https://github.com/hamyyy/grblHAL-simulator

steps to run:

install docker for windows
run docker-build.bat script
run docker-run.bat script

I'll update the Readme later. just posting this in case anyone finds it useful.

currently the only way to interact with the sim is via telnet and defaults to port 4000.
some config.h settings are set in the cmakelists file

@tcurdt
Copy link

tcurdt commented May 29, 2023

Interesting. Would be nice to have the Dockerfile in the main repo I guess.

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