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

Fix build on Mingw/Cygwin (fixes #144) #145

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rasa
Copy link

@rasa rasa commented Feb 23, 2018

No description provided.

@rasa
Copy link
Author

rasa commented Feb 23, 2018

Executables are at:
https://github.com/rasa/git-crypt/releases
and can be installed via scoop:
scoop install git-crypt

@ezk84
Copy link

ezk84 commented Jul 16, 2019

I want to add here that in order to make this work I had to link against the dll version of the crypto library:

make would run into a stack of errors of the form:

C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../lib\libcrypto.a(b_addr.o):(.text+0xab): undefined reference to `__imp_getnameinfo'

What I did then was run

g++ -Wall -pedantic -Wno-long-long -O2 -std=c++11 -static -o git-crypt git-crypt.o commands.o crypto.o gpg.o key.o util.o parse_options.o coprocess.o fhstream.o crypto-openssl-10.o crypto-openssl-11.o -lgdi32 /mingw64/lib/libcrypto.dll.a

in order to link directly to the dll and not /mingw64/lib/libcrypto.a. Seems something's off with the way libcrypto is compiled (according to this stack overflow)

Hoping this helps someone trying to get this compiled on Windows.

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

Successfully merging this pull request may close these issues.

2 participants