Phillip G. wrote:
The MinGW compiler used by ruby needs to know where the header files
are to get them.
My guess is that you need the source for libnfc, and add their path to
your your %path% environment variable (if only temporarily), by doing
something like “set path = %path%;C:\Path\To\Header\Files”, and then
“gem install”.
Mind, this doesn’t guarantee, at all, that your gem will work. Or even
that the libnfc you have works (the lib has to be compiled for windows,
with a compiler compatible to MinGW32’s gcc3.4 to be usable by Ruby),
and the header files have to be usable for Windows, too.
Linux and Windows platforms are not compatible to each other, so
unless you know your way around C, and can fix the errors gcc/gem hands
you, you’ll either have to fix the errors yourself, or lobby the
libnfc/nfc-gem maintainers to fix the issue (if, indeed, this is an
issue for them in the first place).
I do have the binaries for Windows, the problem is where to put them in
order for the RubyGem installer to detect them. By running c:\gem
install nfc I get, amongst other things:
checking for libnfc/libnfc.h in
/opt/local/include,/opt/local/include,/usr/local
/include,C:/Ruby19/include,/usr/include… no
libnfc is missing. please install libnfc: http://libnfc.org/
I can trick this process by creating a folder libnfc inside
C:/Ruby19/include, and then put the libnfc.h there (as the rest of the
files). Doing that I get:
checking for libnfc/libnfc.h in
/opt/local/include,/opt/local/include,/usr/local
/include,C:/Ruby19/include,/usr/include… yes
checking for nfc_connect() in -lnfc… no
libnfc is missing. please install libnfc: http://libnfc.org/
So basically I need to figure out where everything goes, regarding the
libnfc binary files.