# mfoc4win **Repository Path**: sobweb/mfoc4win ## Basic Information - **Project Name**: mfoc4win - **Description**: mfoc在windows下编译的分支 - **Primary Language**: C - **License**: GPL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-07-27 - **Last Updated**: 2024-05-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mfoc4win #### 项目介绍 mfoc在windows下编译的分支,相较于[GitHub上的原项目](https://github.com/nfc-tools/mfoc),只改动了`src/nfc-utils.c`和`src/nfc-utils.h`中,由于Windows下MinGW不存在的`err.h`头文件,造成的编译无法通过的问题。[参考](http://blog.sina.com.cn/s/blog_49861ba30102wths.html) #### 软件架构 cccccccccccccccccccccccccccccccccccc #### 安装教程 0. 将编译`libnfc`得到的`libnfc.dll.a`改名为`libnfc.a`,放入MinGW路径`/mingw/lib`内。 1. 将[pkg.m4](http://win32builder.gnome.org/packages/3.6/pkg-config-dev_0.28-1_win32.zip)文件放入msys路径\share\aclocal-1.11中, 跳过No.2坑`(之所以是No.2,因为不做这一步该错误是第二个出现,出错之后安装步骤要重新来过)` **不需要**[安装pkg-config](http://www.gaia-gis.it/spatialite-3.0.0-BETA/mingw_how_to.html#pkg-config) 2. `aclocal -I m4 --install` 跳过No.1坑,[参考](https://stackoverflow.com/posts/8817650/revisions) 3. `autoreconf -is` 4. `LIBS=/mingw/lib/libnfc.a ./configure PKG_CONFIG=:` 跳过No.4坑(原创)和No.3坑([参考](https://stackoverflow.com/questions/8241564/lib-path-on-mac-osx)) 5. `make` #### 跳坑记录 1. `configure.ac:17: error: possibly undefined macro: AC_MSG_ERROR` 2. `./configure: line 3739: syntax error near unexpected token `libnfc,'` 3. `configure: error: libnfc >= 1.7.0 is mandatory.` 4. `undefined reference to `_imp__nfc_init' ... 一连串的`undefined reference to` `collect2.exe: error: ld returned 1 exit status` #### 使用说明 > mfoc -h