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

mingw-cross-configure.sh not working #188

Closed
GoogleCodeExporter opened this issue Apr 3, 2015 · 7 comments
Closed

mingw-cross-configure.sh not working #188

GoogleCodeExporter opened this issue Apr 3, 2015 · 7 comments
Labels

Comments

@GoogleCodeExporter
Copy link

Cross compiling for windows with the SVN's script mingw-cross-configure.sh does 
not work for two reasons:
1. `--with-drivers` is started with (now) unknown drivers. changing it to 
`--with-drivers=all` fixes this problem
2. `winscard.h` is missing for mingw32. copying `winscard.h` from mingw-w64 
results in compilation errors...

Original issue reported on code.google.com by frankmor...@googlemail.com on 8 Apr 2012 at 12:36

@GoogleCodeExporter
Copy link
Author

I fixed mingw-cross-configure.sh. However, there are still some linker errors 
that i cannot resolve (see attached files).

Original comment by frankmor...@googlemail.com on 10 Apr 2012 at 6:16

Attachments:

@GoogleCodeExporter
Copy link
Author

I fixed my previous patch. Libnfc now builds with pure MinGW-w64. Executables 
cannot be currently built however. Limitations are documented in 
mingw-cross-configure.sh.

Note that my patch also fixes some compiler warnings.

Original comment by frankmor...@googlemail.com on 13 Apr 2012 at 10:46

Attachments:

@GoogleCodeExporter
Copy link
Author

In r484dd5dfa513ef1bc948ef90d441a99c6197e252, the mingw script have been 
updated following your provided patch, thank you Frank for this patch!

Nevertheless, I did not push the "#ifdef _WIN32" introduction, since it can be 
done cleanly using the generated config.h instead of add theses lines to many 
files.
Additionnally, we can't add e#define nfc_EXPORTSe directly in all files since 
it will cause trouble to CMake users when they will want to compile against 
libnfc.

I suggest add this "#define nfc_EXPORTS" at config.h too, as you already done 
in the mingw script.

Many thanks for your efforts, I hope you will be able to cross compile using 
this script one day :)

Please note that current version can not be built under Windows: see Issue 215.

Original comment by romu...@libnfc.org on 5 Dec 2012 at 5:37

  • Changed state: Feedback
  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

Hi everyone, I attempted to build git commit 
0203ade66c4168cbb7bf835e2c35b3d35e86d84a (latest) with 
'mingw-cross-configure.sh' on Windows. Configure ends without any error. But 
with 'make' I am getting the following error.

----
make  all-recursive
make[1]: Entering directory `/c/Users/Babil/Desktop/libnfc'
Making all in libnfc
make[2]: Entering directory `/c/Users/Babil/Desktop/libnfc/libnfc'
Making all in chips
make[3]: Entering directory `/c/Users/Babil/Desktop/libnfc/libnfc/chips'
  CC     libnfcchips_la-pn53x.lo
In file included from pn53x.c:37:0:
../../libnfc/nfc-internal.h:30:17: fatal error: err.h: No such file or directory
compilation terminated.
make[3]: *** [libnfcchips_la-pn53x.lo] Error 1
make[3]: Leaving directory `/c/Users/Babil/Desktop/libnfc/libnfc/chips'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/c/Users/Babil/Desktop/libnfc/libnfc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/Users/Babil/Desktop/libnfc'
make: *** [all] Error 2
----

I wrapped around 'err.h' with 'ifndef _WIN32' but it gives me more error in 
winscard_clnt.c. Please have a look.

Original comment by gsbabil on 10 Feb 2013 at 6:26

@GoogleCodeExporter
Copy link
Author

> I wrapped around 'err.h' with 'ifndef _WIN32' but it gives me more error in 
winscard_clnt.c. Please have a look.

Where do you get the file winscard_clnt.c from libnfc?

Original comment by ludovic....@gmail.com on 10 Feb 2013 at 9:28

@GoogleCodeExporter
Copy link
Author

You may want to have a look at this patch
http://vsmartcard.git.sourceforge.net/git/gitweb.cgi?p=vsmartcard/vsmartcard;a=b
lob_plain;f=pcsc-relay/win32/libnfc_mingw.patch
although I haven't tested it for a while

I used mingw-w64 for cross compiling, which provides -lwinscard

Original comment by frankmor...@googlemail.com on 10 Feb 2013 at 10:32

@smortex smortex added bug and removed Type-Defect labels Apr 27, 2015
@neomilium
Copy link
Member

This issue is old and and no more comment. The code may have been fixed upstream.
Please reopen if relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants