Closed zhangzhe192608 closed 5 years ago
Using ssrNative in macOS instead.
Sometimes in the future, ssrLocal will be removed.
@ssrlive Thanks for your prompt reply!
When I was using ssrNative
, there were several missing headers (for example, 'uv-mbed/uv-mbed.h' file not found
)and I added then accordingly to the header search path:
After that, there are still several erros:
Error Group
:-1: Undefined symbol: _http_headers_destroy
:-1: Undefined symbol: _http_headers_get_field_val
:-1: Undefined symbol: _http_headers_get_status
:-1: Undefined symbol: _http_headers_parse
:-1: Undefined symbol: _websocket_build_frame
:-1: Undefined symbol: _websocket_generate_sec_websocket_accept
:-1: Undefined symbol: _websocket_generate_sec_websocket_key
:-1: Undefined symbol: _websocket_retrieve_payload
What should I do?
Add the .c files to the project.
@ssrlive
Sorry, what do you mean by .c
files? I tried to add the missing files from ./src/*
but the error is still:
:-1: Undefined symbol: _http_headers_destroy
:-1: Undefined symbol: _http_headers_get_field_val
:-1: Undefined symbol: _http_headers_get_status
:-1: Undefined symbol: _http_headers_parse
:-1: Undefined symbol: _websocket_build_frame
:-1: Undefined symbol: _websocket_generate_sec_websocket_accept
:-1: Undefined symbol: _websocket_generate_sec_websocket_key
:-1: Undefined symbol: _websocket_retrieve_payload
The full error message:
Undefined symbols for architecture x86_64:
"_http_headers_destroy", referenced from:
_tunnel_tls_on_data_received in client.o
"_http_headers_get_field_val", referenced from:
_tunnel_tls_on_data_received in client.o
"_http_headers_get_status", referenced from:
_tunnel_tls_on_data_received in client.o
"_http_headers_parse", referenced from:
_tunnel_tls_on_data_received in client.o
"_websocket_build_frame", referenced from:
_tunnel_tls_client_incoming_streaming in client.o
"_websocket_generate_sec_websocket_accept", referenced from:
_tunnel_tls_on_data_received in client.o
"_websocket_generate_sec_websocket_key", referenced from:
_tunnel_tls_on_connection_established in client.o
"_websocket_retrieve_payload", referenced from:
_tunnel_tls_on_data_received in client.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Hello @ssrlive, here is an update! The good news it that I can compile the project by adding the source files into the target's 'Compile Sources':
Am I dong this right? I added:
http_parser_wrapper.c
http_parser_wrapper.h
http_parser.h
http_parser.c
ws_tls_basic.h
ws_tls_basic.c
yes
Thank you so much for your kind help, @ssrlive!
Best wishes to you!
I'm closing this issue and may open it again if I have any further questions.
What version of shadowsocks-native are you using?
HEAD
of this repo.What operating system are you using?
macOS
What did you do?
I was trying to compile
ssrLocal macOS
however there seems to be a lot of missing staff, including:libpcre
because Xcode said it is an iOS dependency../libcork/include ../libipset/include ../depends/pcre ../depends/libuv/include ../depends/mbedtls/include ../depends/libsodium/src/libsodium/include ../depends/libsodium/ssrbuild/include ../depends/libsodium/src/libsodium/include/sodium
MODULE_LOCAL inet_XtoX_no_ntop USE_CRYPTO_MBEDTLS HAVE_CONFIG_H $(inherited)
However, I cannot compile
ssrLocal.xcodeproj
for both iOS and macOS. What should I do?What did you expect to see?
The compilation passed without any errors.
What did you see instead?
Actually the compilation passed. However, I am not sure whether is is a correct way to do so.
What is your config in detail (with all sensitive info masked)?
No need to provide this.