xcode building error: Undefined symbols for architecture x86_64: "_GSS_C_NT_HOSTBASED_SERVICE"
I create a command line project in, copy the code of Chapter 1: A typical SSH session, then I import libssh.a and include files, occur error when I run the code,
Error message shows that some variables of GSSAPI cannot be found. so I turn off the WITH_GSSAPI compile option, then the error is gone.
os: macos monterey 12.6.1; xcode :13.4.1; libssh: 0.10.6
building error:
Undefined symbols for architecture x86_64: "_GSS_C_NT_HOSTBASED_SERVICE", referenced from: _ssh_gssapi_handle_userauth in libssh.a(gssapi.c.o) _ssh_gssapi_auth_mic in libssh.a(gssapi.c.o) "_GSS_C_NT_USER_NAME", referenced from: _ssh_gssapi_match in libssh.a(gssapi.c.o) "_gss_accept_sec_context", referenced from: _ssh_packet_userauth_gssapi_token_server in libssh.a(gssapi.c.o) "_gss_acquire_cred", referenced from: _ssh_gssapi_handle_userauth in libssh.a(gssapi.c.o) _ssh_gssapi_match in libssh.a(gssapi.c.o) "_gss_add_oid_set_member", referenced from: _ssh_gssapi_handle_userauth in libssh.a(gssapi.c.o) _ssh_gssapi_match in libssh.a(gssapi.c.o) "_gss_create_empty_oid_set", referenced from: _ssh_gssapi_handle_userauth in libssh.a(gssapi.c.o) _ssh_gssapi_match in libssh.a(gssapi.c.o) "_gss_display_name", referenced from: _ssh_gssapi_name_to_char in libssh.a(gssapi.c.o) "_gss_display_status", referenced from: _ssh_gssapi_log_error in libssh.a(gssapi.c.o) "_gss_get_mic", referenced from: _ssh_gssapi_send_mic in libssh.a(gssapi.c.o) "_gss_import_name", referenced from: _ssh_gssapi_handle_userauth in libssh.a(gssapi.c.o) _ssh_gssapi_auth_mic in libssh.a(gssapi.c.o) _ssh_gssapi_match in libssh.a(gssapi.c.o) "_gss_indicate_mechs", referenced from: _ssh_gssapi_handle_userauth in libssh.a(gssapi.c.o) "_gss_init_sec_context", referenced from: _ssh_packet_userauth_gssapi_token_client in libssh.a(gssapi.c.o) _ssh_packet_userauth_gssapi_response in libssh.a(gssapi.c.o) "_gss_inquire_cred", referenced from: _ssh_gssapi_match in libssh.a(gssapi.c.o) "_gss_inquire_cred_by_mech", referenced from: _ssh_gssapi_match in libssh.a(gssapi.c.o) "_gss_release_buffer", referenced from: _ssh_packet_userauth_gssapi_token_server in libssh.a(gssapi.c.o) _ssh_packet_userauth_gssapi_token_client in libssh.a(gssapi.c.o) _ssh_gssapi_log_error in libssh.a(gssapi.c.o) _ssh_gssapi_name_to_char in libssh.a(gssapi.c.o) _ssh_packet_userauth_gssapi_response in libssh.a(gssapi.c.o) _ssh_gssapi_send_mic in libssh.a(gssapi.c.o) "_gss_release_cred", referenced from: _ssh_gssapi_free in libssh.a(gssapi.c.o) "_gss_release_name", referenced from: _ssh_gssapi_handle_userauth in libssh.a(gssapi.c.o) _ssh_gssapi_match in libssh.a(gssapi.c.o) "_gss_release_oid_set", referenced from: _ssh_gssapi_handle_userauth in libssh.a(gssapi.c.o) _ssh_gssapi_auth_mic in libssh.a(gssapi.c.o) _ssh_gssapi_match in libssh.a(gssapi.c.o) "_gss_test_oid_set_member", referenced from: _ssh_gssapi_handle_userauth in libssh.a(gssapi.c.o) "_gss_verify_mic", referenced from: _ssh_packet_userauth_gssapi_mic in libssh.a(gssapi.c.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)