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

Can't compile in Windows #522

Closed
GiovanniCapizzi opened this issue Aug 30, 2019 · 4 comments
Closed

Can't compile in Windows #522

GiovanniCapizzi opened this issue Aug 30, 2019 · 4 comments
Labels
O-Windows 🖥️ Operating system: Windows

Comments

@GiovanniCapizzi
Copy link

I tried to compile using mingw64 GCC, but have no result.

Followed instructions here also to try with wsl but it got stuck on libsoter:

#316 (comment)

@ilammy
Copy link
Collaborator

ilammy commented Sep 3, 2019

Hi @GiovanniCapizzi,

Currently Themis does not support native Windows builds. However, it is possible to build Themis via some POSIX adapter layer, such as MinGW or Cygwin. We have found MSYS2 to be the easiest way to build Themis binaries for use by Windows software.

  1. Install MSYS2 for x86_64 platform.

  2. Open a new MSYS2 terminal (Start > MSYS2 > MSYS2 MSYS).

  3. Install build tools and dependencies:

pacman -S git make gcc openssl-devel
  1. Check out Themis, build and run tests:
git clone https://github.com/cossacklabs/themis
cd themis
make test

Please let us know if that does not work for you.


The resulting binaries will be placed into the build directory:

  • msys-soter-0.dll, msys-themis-0.dll: DLLs to be distributed with your application
  • libsoter.dll.a, libthemis.dll.a: import libraries to be used when building your application

Note that Themis DLLs depend on some MSYS2 DLLs which need to be distributed together with Themis:

  • msys-2.0.dll
  • msys-crypto-1.1.dll
  • msys-z.dll

They can be found in /usr/bin directory of MSYS2 environment (typically C:\msys64\usr\bin from Windows point of view).


If you install NullSoft Installation System:

pacman -S mingw-w64-x86_64-nsis
export PATH=$PATH:/mingw64/bin

then you can run

make nsis_installer

to build an installer for Themis which can be used to install Themis and all necessary dependencies.

@vixentael vixentael added the O-Windows 🖥️ Operating system: Windows label Sep 4, 2019
@vixentael
Copy link
Contributor

Closing due to lack of response.

@GiovanniCapizzi if you experienced any problems, consider reopening :)

@GiovanniCapizzi
Copy link
Author

GiovanniCapizzi commented Sep 26, 2019

Sorry being late, I forgot totally about this (I was very busy) . I also moved on another OS but keep an eye on Windows. Perfect guide, it should be included in the readme file. Thank you for your time, it worked!

@vixentael
Copy link
Contributor

Thanks @GiovanniCapizzi! Yes, we're going to publish Windows-specific guide very soon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-Windows 🖥️ Operating system: Windows
Projects
None yet
Development

No branches or pull requests

3 participants