Posted comments (19)

Posted by Adam at November 5, 2013 12:08:32 UTC
Hi. Nice guide but I have a problem after running cmake. I get all this errors. Where is my error

CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file: C:/libnfc-build/CMakeFiles/2.8.12/CMakeCCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
Configuring incomplete, errors occurred!
Posted by Wouter at March 25, 2014 16:48:35 UTC
Hi,

I've been following all of your steps until the last one: mingw32-make. Cmake fully configured the installation. Sad enough, when I run mingw32-make in the build folder. I'm getting the following output and errors:

http://pastebin.com/wMKmAdLE

I hope someone can help me with this.

I'm runnig Windows 8 64 bit by the way.
Posted by Thomas at May 6, 2014 13:34:01 UTC
Hi Wouter,

I try to install libnfc but I have the same problem as you.
Did you find an answer about that ?

Thanks.
Posted by Kantum at May 31, 2014 19:01:18 UTC
Hi everybody,

Same configuraiton and same problem too.
Do you have any answer ?

Thanks a lot.
Posted by Guglielmo at October 16, 2014 11:48:58 UTC
i follow all step: compile 32 bit version... no problem! If i try to compile under a 64 bit machine it still build a 32 bit version, i check all and i don't understand why it doensn't compile a 64 bit version. How to force target to 64 bit?
Posted by Sliman at October 26, 2014 10:19:14 UTC
Hi everybody,

When I compile the libnfc-1.7.0 (win), i get the message that the libnfc.rc not at the location already set. Can you please tell me how can I get or generate the rc file?

Thanks a lot.
Regards
Posted by Pramod at March 12, 2015 13:06:39 UTC
Hi, Very well explained guide. Thaks for providing such a nice guide.

I am getting following error during mingw32-make. Can you please point me what needs to be done to get rid of this issue.

c:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/sec_api/time_s.h:45: multiple definition of `localtime_s'

c:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/sec_api/time_s.h:45: first defined here
Posted by Hans E at April 24, 2015 16:06:31 UTC
Thank you soo much for this guide! Would never have managed this with out you! :) now its reading nfc like a champ!! :D

A slight comment to those who install on 64 bit windows systems and get the "This application has failed to start because libnfc.dll was not found. Re-installing the application may fix this problem." - message: the libnfc.dll file should be copied to the C:\Windows\SysWOW64 folder as this is the system directory for 32 bit files.!!!
Posted by Nicholas B at April 28, 2015 22:04:20 UTC
First, thank you for the instructions! I had to "install both the libnfc.dll and libusb0.dll as I got the same error for both when trying to launch one of the applications. I had to copy the .dll files to the system or sysWOW64 directories. Now I am getting an error...

The application failed to start correctly (0xc000007b). Click OK to close the application.

Any thoughts?
Posted by Bobbymcguire at July 22, 2015 07:25:42 UTC
I got the same error as Nicholas B, any idea to solve it ?
Posted by Julio Jose Gg at October 4, 2015 08:44:25 UTC
He seguido todos los pasos y me sale este error en cmake:

Could NOT find LATEX (missing: LATEX_COMPILER)
CMake Warning (dev) at cmake/modules/UseDoxygen.cmake:94 (get_target_property):
Policy CMP0045 is not set: Error on non-existent target in
get_target_property. Run "cmake --help-policy CMP0045" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.

get_target_property() called with non-existent target "doc".
Call Stack (most recent call first):
CMakeLists.txt:70 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.

Found LIBUSB: C:/tools/libusb-win32-bin-1.2.6.0/lib/gcc/libusb.a C:/tools/libnfc 1.7.1/include
Year for copyright is 2015
CMake Error at C:/tools/CMake/share/cmake-3.3/Modules/CMakePackageConfigHelpers.cmake:258 (message):
Variable LIBNFC_ROOT_DIR does not exist
Call Stack (most recent call first):
CMakeLists.txt:195 (configure_package_config_file)


Configuring incomplete, errors occurred!
See also "C:/libnfc-build/CMakeFiles/CMakeOutput.log".

ME PUEDEN AYUDAR???? GRACIAS.
Posted by Don at October 9, 2015 01:28:45 UTC
I coppied both the libnfc.dll and libusb0.dll to the executable directory as I got the same error for both when trying to launch one of the applications. I too am getting an error...

The application failed to start correctly (0xc000007b). Click OK to close the application.

Google hasn't turned up much.
Posted by Don at October 9, 2015 01:45:47 UTC
The application failed to start correctly (0xc000007b). Click OK to close the application.

*FIX*
In CMAKE choose
libusb-win32-bin-1.2.6.0\lib\msvc_x64\libusb.lib
as your
LIBUSB_LIBRARIES value
Posted by Forec at November 4, 2015 13:05:31 UTC
I finished all the steps above, but I got a different message after my attemp to execute nfc-list.exe. My PC is 64bit Windows 10. It told me I lost usblib0.dll. I found that file in libusb-win32-bin-1.2.6.0/bin/amd64/libusb0.dll, and copied that file to both C:/Windows/system32 and C:/Windows/Wowsystem64. However I still can't run that application because it told me the file libusb0.dll is wrong. What should I do?
Posted by Tom at November 10, 2015 15:07:08 UTC
FOR ALL WINDOWS 64 BIT USER:

1. copy libnfc.dll to C:\Windows\SysWOW64
2. copy C:\Tools\libusb-win32-bin-1.2.6.0\bin\x86\libusb0_x86.dll
to C:\Windows\SysWOW64
3. rename C:\Windows\SysWOW64\libusb0_x86.dll to libusb0.dll

the hint is in C:\Tools\libusb-win32-bin-1.2.6.0\bin\libusb-win32-bin-README.txt ;)

hope it works for you. Tested at Windows 7 64bit
Posted by Tom at November 10, 2015 15:18:06 UTC
@ Julio Jose

just click "Add Entry" in cmake-gui and add LIBNFC_ROOT_DIR and put it to path and inset as example C:/Tools/libnfc
Posted by Abdullah at February 2, 2016 10:57:03 UTC
Hey, just wanted to say I really appreciate this post. You're a life saver!
Posted by Somsay at February 22, 2017 08:52:46 UTC
Hi
Though I god success on CMake step, i can not have good result as mingw32-make

....
c:/.../lib/libmsvcrt.a when searching for -lmsvcrt
c:/.../bin/ld.exe: cannot find -lmsvcrt
...
Makefile:148: recipe for target 'all' failed

But i can see libmsvcrt.a
i hope your guide
Posted by Marc A at April 25, 2017 16:02:31 UTC
I copied libnfc.dll and libusb0.dll to C:\Windows\SysWOW64 directory. Everything builds up to pn53x-diagnose.exe. Here's my output.

[ 19%] Built target nfc
[ 20%] Built target win32lib
[ 22%] Built target nfcutils
[ 26%] Built target nfc-list
[ 30%] Built target nfc-emulate-forum-tag4
[ 34%] Built target nfc-jewel
[ 39%] Built target nfc-mfclassic
[ 43%] Built target nfc-relay-picc
[ 48%] Built target nfc-mfultralight
[ 53%] Built target nfc-scan-device
[ 56%] Built target nfc-read-forum-tag3
[ 60%] Built target nfc-anticol
[ 63%] Built target nfc-dep-initiator
[ 67%] Built target nfc-dep-target
[ 71%] Built target nfc-emulate-forum-tag2
[ 74%] Built target nfc-emulate-tag
[ 78%] Built target nfc-emulate-uid
[ 81%] Built target nfc-mfsetuid
[ 85%] Built target nfc-poll
[ 89%] Built target nfc-relay
[ 90%] Linking C executable pn53x-diagnose.exe
CMakeFiles\pn53x-diagnose.dir/objects.a(pn53x-diagnose.c.obj): In function `main':
C:/SUPPORT_TOOLS/libnfc-master/examples/pn53x-diagnose.c:106: undefined reference to `pn53x_transceive'
C:/SUPPORT_TOOLS/libnfc-master/examples/pn53x-diagnose.c:117: undefined reference to `pn53x_transceive'
C:/SUPPORT_TOOLS/libnfc-master/examples/pn53x-diagnose.c:126: undefined reference to `pn53x_transceive'
collect2.exe: error: ld returned 1 exit status
examples\CMakeFiles\pn53x-diagnose.dir\build.make:117: recipe for target 'examples/pn53x-diagnose.exe' failed
mingw32-make[2]: *** [examples/pn53x-diagnose.exe] Error 1
CMakeFiles\Makefile2:954: recipe for target 'examples/CMakeFiles/pn53x-diagnose.dir/all' failed
mingw32-make[1]: *** [examples/CMakeFiles/pn53x-diagnose.dir/all] Error 2
Makefile:150: recipe for target 'all' failed
mingw32-make: *** [all] Error 2


Any ideas? Some people apparently got the original code to work in linux. Not sure what would be happening on Windows 7 64 bit PC? Issue seems code related though, somehow.