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

ubuntu 下编译不过啊 #8

Open
lersh opened this issue Oct 25, 2017 · 1 comment
Open

ubuntu 下编译不过啊 #8

lersh opened this issue Oct 25, 2017 · 1 comment

Comments

@lersh
Copy link

lersh commented Oct 25, 2017

ubuntu 16.04 按照教程编译,最后报错

.libs/libshadowsocks_libev_la-tls.o:(.data.rel.ro.local+0x10): multiple definition of `tls_protocol'
.libs/libshadowsocks_libev_la-local.o:(.bss+0x20): first defined here
collect2: error: ld returned 1 exit status
Makefile:573: recipe for target 'libshadowsocks-libev.la' failed
make[3]: *** [libshadowsocks-libev.la] Error 1
make[3]: Leaving directory '/home/selphy/shadowsocksr-libev/src'
Makefile:478: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/selphy/shadowsocksr-libev'
Makefile:387: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/selphy/shadowsocksr-libev'
dh_auto_build: make -j1 returned exit code 2
debian/rules:25: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: 错误: debian/rules build 提供错误退出状态 2
@onlinedj
Copy link

diff --git a/src/http.h b/src/http.h
index 914815a..e312dd3 100644
--- a/src/http.h
+++ b/src/http.h
@@ -29,6 +29,6 @@
#include <stdio.h>
#include "protocol.h"

-const protocol_t *const http_protocol;
+extern const protocol_t *const http_protocol;

#endif
diff --git a/src/tls.h b/src/tls.h
index 3998913..ddbee11 100644
--- a/src/tls.h
+++ b/src/tls.h
@@ -28,6 +28,6 @@

#include "protocol.h"

-const protocol_t *const tls_protocol;
+extern const protocol_t *const tls_protocol;

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

No branches or pull requests

2 participants