未定义的引用C文件

时间:2017-06-29 21:39:12

标签: c undefined-reference

我在github上使用libnfc项目:

当我尝试编译这个文件时

https://github.com/nfc-tools/libnfc/blob/master/examples/pn53x-diagnose.c

我收到了 ( # (1 start) \. [^{}]+? ) # (1 end) \s* { [^{}]*? font-style \s* : \s* italic ; [^{}]*? }

的错误

第106 + 117行

为什么呢?它在第53行undefined reference to pn53x_transceive' 并在此文件上: https://github.com/nfc-tools/libnfc/blob/master/libnfc/chips/pn53x.h 我有这个功能(第305行):

#include "libnfc/chips/pn53x.h"

我该怎么办? 谢谢!

1 个答案:

答案 0 :(得分:0)

您知道用于声明pn53x_transceive函数接口的头文件。现在,您需要找出包含该函数实现的文件,并将该文件(可能是库)链接到您的可执行文件。