Github :: https://github.com/mmgaggle/sslsqueeze
我正在尝试从源代码构建来自github的名为“ sslsqueeze ”的代码。我已经安装了所有必需的库,但是由于某些原因,“ make ”命令仍然无法链接它们。我确信这里缺少一个非常简单的要点/步骤,但是经过数小时的调试,我正在向您求助。
sslsqueeze.c 文件包含以下行:
**sslsqueeze** needs to be linked with -levent_core from libevent2 library.
因此,我已经安装了 libevent-dev 库。然后运行以下命令:
make
这是我的错误列表:
sslsqueeze.o: In function `new_connection':
sslsqueeze.c:(.text+0x57): undefined reference to `bufferevent_socket_new'
sslsqueeze.c:(.text+0x68): undefined reference to `bufferevent_set_timeouts'
sslsqueeze.c:(.text+0x88): undefined reference to `bufferevent_setcb'
sslsqueeze.c:(.text+0x9d): undefined reference to `bufferevent_socket_connect'
sslsqueeze.o: In function `read_cb':
sslsqueeze.c:(.text+0x161): undefined reference to `bufferevent_read'
sslsqueeze.c:(.text+0x20d): undefined reference to `bufferevent_free'
sslsqueeze.c:(.text+0x25d): undefined reference to `bufferevent_write'
sslsqueeze.c:(.text+0x288): undefined reference to `bufferevent_write'
sslsqueeze.c:(.text+0x2b3): undefined reference to `bufferevent_write'
sslsqueeze.o: In function `event_cb':
sslsqueeze.c:(.text+0x2ed): undefined reference to `bufferevent_free'
sslsqueeze.o: In function `write_cb':
sslsqueeze.c:(.text+0x136): undefined reference to `bufferevent_enable'
sslsqueeze.o: In function `event_cb':
sslsqueeze.c:(.text+0x32c): undefined reference to `bufferevent_write'
sslsqueeze.o: In function `main':
sslsqueeze.c:(.text.startup+0x1f9): undefined reference to `event_base_new'
sslsqueeze.c:(.text.startup+0x229): undefined reference to `event_base_dispatch'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'sslsqueeze' failed
make: *** [sslsqueeze] Error 1
经过研究,我尝试了以下所有命令来获得相同的结果:
make -levent_core
gcc -levent_core sslsqueeze.c -o take6
gcc -L/usr/lib/x86_64-linux-gnu sslsqueeze.c -o take8
以下内容也未成功。他们给出了“ 找不到文件”错误。
gcc -L/usr/lib/x86_64-linux-gnu -libevent_core.so sslsqueeze.c -o take7
gcc -L/usr/lib/x86_64-linux-gnu -libevent_core.a sslsqueeze.c -o take7
最后一条信息。
头文件位于/usr/include/event2
libevent_core文件位于/usr/lib/x86_64-linux-gnu/
(2个文件中,一个带有.so扩展名,另一个带有.a)
任何帮助将不胜感激!