-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid compilation errors for Windows
- Loading branch information
Showing
3 changed files
with
6 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35d9e00
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @torognes !
How do you cross-compile for Windows? Maybe I can add that specific cross-compilation to my dev-tests? That would allow me to detect issues as the one above earlier, and avoid pushing them to the repository.
35d9e00
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @frederic-mahe !
To compile for Windows, from my Mac, I build a Docker container with a Linux setup and use the g++ cross compiler. Here is the Dockerfile that does it all:
As you see, packages are installed and downloaded to get the bzip2 and gz compression libraries for windows (mingw64).
I run
configure
with--host=x86_64-w64-mingw32
to activate the cross compiler.The script also tests that the resulting binary at least runs using the
wine
emulator.Should be easier on a Linux box, but you see which packages are required.
35d9e00
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @torognes !