我正在尝试运行 Apache 流量服务器的 bnull-transform 示例。在对代码的 github 版本中不存在的一些更改进行了一些更改之后,我终于能够解决错误。但是当我使用 gcc 编译它时,我得到了以下错误 -
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/crt1.o: 在函数_start':
(.text+0x20): undefined reference to
main' /tmp/cc5gVORu.o: 在函数my_data_alloc':
bnull-transform.c:(.text+0x13): undefined reference to
_TSmalloc' /tmp/cc5gVORu.o: 在函数my_data_destroy':
bnull-transform.c:(.text+0x7b): undefined reference to
TSIOBufferDestroy'bnull-transform.c:(.text+0x87): 未定义的句柄缓冲引用_TSfree'
/tmp/cc5gVORu.o: In function
': bnull-transform.c:(.text+0xa8): 未定义TSVConnWriteVIOGet'
bnull-transform.c:(.text+0xbe): undefined reference to
的引用 TSIOBufferCreate'bnull- transform.c:(.text+0xe7): 未定义引用_TSAssert'
bnull-transform.c:(.text+0xf9): undefined reference to
TSIOBufferReaderAlloc' bnull-transform.c:(.text+0x122): 未定义引用_TSAssert'
bnull-transform.c:(.text+0x130): undefined reference to
TSVIOBufferGet' bnull-transform.c:(.text+0x155): 未定义引用TSVIONTodoGet'
bnull-transform.c:(.text+0x16e): undefined reference to
TSVIOReaderGet' bnull-transform.c:(.text+0x176): 未定义引用TSIOBufferReaderAvail'
bnull-transform.c:(.text+0x19f): undefined reference to
TSVIOReaderGet' bnull-transform.c:(.text+0x1bd): 未定义引用TSIOBufferCopy'
bnull-transform.c:(.text+0x1cf): undefined reference to
TSVIOReaderGet' bnull-transform.c:(.text+0x1da): 未定义引用TSIOBufferReaderConsume'
bnull-transform.c:(.text+0x1e6): undefined reference to
TSVIONDoneGet' bnull-transform.c:(.text+0x1ff): 未定义引用TSVIONDoneSet'
bnull-transform.c:(.text+0x20b): undefined reference to
TSVIONTodoGet' bnull-transform.c:(.text+0x222) : 未定义对TSVIOContGet'
bnull-transform.c:(.text+0x233): undefined reference to
TSContCall' bnull-transform.c:(.text+ TSVIOContGet'
bnull-transform.c:(.text+0x25c): undefined reference to
0x24b handle_output':
bnull-transform.c:(.text+0x294): undefined reference to
) 的引用到TSIOBufferReaderAvail'
bnull-transform.c:(.text+0x2c6): undefined reference to
TSVConnWrite' bnull-transform.c:(.text+0x2ef): 未定义对_TSAssert'
/tmp/cc5gVORu.o: In function
handle_transform 的引用': bnull-transform.c:(.text+0x315): 未定义对TSContDataGet'
bnull-transform.c:(.text+0x341): undefined reference to
TSContDataSet'/tmp/cc5gVORu.o 的引用:在函数bnull_transform':
bnull-transform.c:(.text+0x3b0): undefined reference to
TSVConnClosedGet ' bnull-transform.c:(.text+0x3c0): 未定义的引用TSContDataGet'
bnull-transform.c:(.text+0x3d4): undefined reference to
TSContDestroy' bnull-transform.c:(.text+0x3f1): 未定义引用TSVConnWriteVIOGet'
bnull-transform.c:(.text+0x401): undefined reference to
TSVIOContGet' bnull-transform.c:(.text+0x412): 未定义引用TSContCall'
bnull-transform.c:(.text+0x420): undefined reference to
TSTransformOutputVConnGet' bnull-transform.c:(.text+0x432) : 未定义对可转换的引用TSVConnShutdown'
/tmp/cc5gVORu.o: In function
':bnull-transform.c:(.text+0x46a): 未定义引用TSHttpTxnServerRespGet'
bnull-transform.c:(.text+0x47d): undefined reference to
TSHttpHdrStatusGet' bnull-transform.c:(.text+0x49b): 未定义引用TS_NULL_MLOC'
bnull-transform.c:(.text+0x4aa): undefined reference to
TSHandleMLocRelease' bnull-transform.c:( .text+0x4be):对TSError'
/tmp/cc5gVORu.o: In function
transform_add 的未定义引用:bnull-transform.c:(.text+0x4e0):对TSTransformCreate'
bnull-transform.c:(.text+0x4f9): undefined reference to
TSHttpTxnHookAdd 的未定义引用'/tmp/cc5gVORu.o:在函数transform_plugin':
bnull-transform.c:(.text+0x54e): undefined reference to
中 TSHttpTxnReenable'/tmp/cc5gVORu.o:在函数中TSPluginInit':
bnull-transform.c:(.text+0x59c): undefined reference to
TSPluginRegister' bnull-transform.c:(.text+0x5af): 未定义的引用TSError'
bnull-transform.c:(.text+0x5bf): undefined reference to
TSError' bnull-transform.c:(.text+0x5d2): undefined reference to TSContCreate'
bnull-transform.c:(.text+0x5df): undefined reference to
TSHttpHookAdd' collect2: ld returned 1 exit status
请帮忙。