how to cross compile libfreefare examples for windows with Msys2/Mingw64

this is working good in 64bits with msys2 (mingw64 shell):

mkdir libfreefare-build
git clone https://github.com/nfc-tools/libfreefare.git
cd libfreefare-build
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ../libfreefare -DLIBNFC_INCLUDE_DIRS=yourpath/to/libnfc/include -DLIBNFC_LIBRARIES=yourpath/to/libnfc.dll

mingw32-make

 

and I had also to comment CmakeLists.txt, lines 41,43,44 to not force 32 bits

# add_definitions("-m32")

add_definitions("-DNOCRYPT")

#set(CMAKE_SHARED_LINKER_FLAGS -m32)

#set(CMAKE_EXE_LINKER_FLAGS -m32)

image

to download, use recaptcha then click on download button

Bookmark the permalink.

About Xavier

7 years+ .net consulting

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha * Time limit is exhausted. Please reload CAPTCHA.