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

MSVC build #75

Open
efp opened this issue Aug 31, 2023 · 1 comment
Open

MSVC build #75

efp opened this issue Aug 31, 2023 · 1 comment
Labels

Comments

@efp
Copy link

efp commented Aug 31, 2023

It seems the windows build was only meant to be done with msys2 or cygwin. It depends on unistd.h... this is available for windows as a separate github project. Other than acquiring that header, the only other modification needed to build with msvc was something along these lines at mcpl.c 2550:

#ifndef STDOUT_FILENO
#define STDOUT_FILENO _fileno(stdout)
#endif

Or it could be done somewhere with an #ifdef _MSC_VER

I was about to say surely we could replace the POSIX stuff with STL stuff, but then I remembered this is C not C++, so I dunno.

@tkittel
Copy link
Member

tkittel commented Aug 31, 2023

Thanks for the report. Yes, we need to more systematically fix the windows compilation. In the near future (this year), I hope we can put MCPL properly on conda and more completely on pypi. At the same time, we would most likely do whatever is needed to make it work on windows as well in that context. As far as I know, that is based on visual studio and not cygwin, so one might hope that it would help your use case as well. Of course, feel free to provide a more complete patch (or fixed file or PR) with the fixes you needed.

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

No branches or pull requests

2 participants