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

Windows build instructions #112

Open
pingzing opened this issue Mar 18, 2021 · 2 comments
Open

Windows build instructions #112

pingzing opened this issue Mar 18, 2021 · 2 comments

Comments

@pingzing
Copy link

pingzing commented Mar 18, 2021

Hi! I'm trying to use this library on Windows, but the build instructions are written for a Linux machine. I can see that the project is supposed to work on Windows, as cmake <repo dir> generates a bunch of Visual Studio projects and a .sln file, but attempting to build any of those fails (usually because something that doesn't exist on Windows is defined).

Can this project be built on Windows?

@stricaud
Copy link
Owner

I think we need some work to be able to build it under Windows. There was an old version, maybe 1.2 which was windows compatible. Do you have the list of all the errors you are having? This way I could fix it and then we could provide a Windows version. Thanks!

@pingzing
Copy link
Author

There's a bunch, and I'm not sure how many of them are just a result of some build flags not quite working correctly. I'll try to summarize:

  • There seems to be an issue with the MINIZ_EXPORT macro used by the miniz headers. Usage of the macro triggers an expected a type specifier error, and the token after it triggers an expected '{' error. This triggers tons of compilation errors in most of the projects.
  • unistd.h doesn't exist on windows, and it's used in a few places, like snapshot-file.c or utils.c.
  • Same for dirent.h.
  • Same for ftw.h.
  • bsd-snprintf.c reports that function 'int snprintf(char *const ,const size_t,const char *const ,...)' already has a body. I think snprintf one may be part of Microsoft's C runtime, and CMake just doesn't set the #define correctly, so it gets defined again here.

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