Whenever I try to compile with switch-curl, I get this error.
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-connect.o): In function `verifyconnect':
connect.c:(.text+0x58): undefined reference to `getsockopt'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-connect.o): In function `Curl_getaddressinfo':
connect.c:(.text+0x260): undefined reference to `inet_ntop'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-connect.o): In function `Curl_updateconninfo':
connect.c:(.text+0x300): undefined reference to `getpeername'
connect.c:(.text+0x340): undefined reference to `getsockname'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-connect.o): In function `Curl_tcpnodelay':
connect.c:(.text+0x4e0): undefined reference to `setsockopt'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-connect.o): In function `Curl_connalive':
connect.c:(.text+0x5f8): undefined reference to `recv'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-connect.o): In function `Curl_socket':
connect.c:(.text+0x7c4): undefined reference to `socket'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-connect.o): In function `singleipconnect':
connect.c:(.text+0x8cc): undefined reference to `setsockopt'
connect.c:(.text+0xb30): undefined reference to `connect'
connect.c:(.text+0xc00): undefined reference to `setsockopt'
connect.c:(.text+0xc30): undefined reference to `setsockopt'
connect.c:(.text+0xc58): undefined reference to `setsockopt'
connect.c:(.text+0xc80): undefined reference to `setsockopt'
connect.c:(.text+0xce8): undefined reference to `bind'
connect.c:(.text+0xda0): undefined reference to `getsockname'
connect.c:(.text+0xec8): undefined reference to `inet_pton'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-select.o): In function `Curl_wait_ms':
select.c:(.text+0x64): undefined reference to `poll'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-select.o): In function `Curl_socket_check':
select.c:(.text+0x210): undefined reference to `poll'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-select.o): In function `Curl_poll':
select.c:(.text+0x480): undefined reference to `poll'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-hostip.o): In function `Curl_printable_address':
hostip.c:(.text+0x318): undefined reference to `inet_ntop'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-cookie.o): In function `Curl_cookie_add':
cookie.c:(.text+0xebc): undefined reference to `inet_pton'
cookie.c:(.text+0x1188): undefined reference to `inet_pton'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-cookie.o): In function `Curl_cookie_getlist':
cookie.c:(.text+0x12c8): undefined reference to `inet_pton'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-sendf.o): In function `Curl_read_plain':
sendf.c:(.text+0x2c4): undefined reference to `recv'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-sendf.o): In function `Curl_send_plain':
sendf.c:(.text+0x810): undefined reference to `send'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-sendf.o): In function `Curl_recv_plain':
sendf.c:(.text+0x930): undefined reference to `recv'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-if2ip.o): In function `Curl_if2ip.part.0':
if2ip.c:(.text+0x50): undefined reference to `socket'
if2ip.c:(.text+0x94): undefined reference to `ioctl'
if2ip.c:(.text+0xb4): undefined reference to `inet_ntop'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-version.o): In function `curl_version.part.0':
version.c:(.text+0x2c): undefined reference to `zlibVersion'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-version.o): In function `Curl_version_init':
version.c:(.text+0x8c): undefined reference to `zlibVersion'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-version.o): In function `curl_version_info':
version.c:(.text+0x100): undefined reference to `zlibVersion'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-telnet.o): In function `sendsuboption':
telnet.c:(.text+0x9ac): undefined reference to `send'
telnet.c:(.text+0x9d4): undefined reference to `send'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-telnet.o): In function `send_negotiation.isra.3':
telnet.c:(.text+0xbc0): undefined reference to `send'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-telnet.o): In function `suboption.isra.4':
telnet.c:(.text+0xd40): undefined reference to `send'
telnet.c:(.text+0xe9c): undefined reference to `send'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-content_encoding.o): In function `gzip_init_writer':
content_encoding.c:(.text+0x298): undefined reference to `zlibVersion'
content_encoding.c:(.text+0x2c0): undefined reference to `inflateInit2_'
content_encoding.c:(.text+0x2f4): undefined reference to `inflateInit2_'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-content_encoding.o): In function `exit_zlib':
content_encoding.c:(.text+0x3a8): undefined reference to `inflateEnd'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-content_encoding.o): In function `deflate_init_writer':
content_encoding.c:(.text+0x4b4): undefined reference to `inflateInit_'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-content_encoding.o): In function `inflate_stream':
content_encoding.c:(.text+0x5a0): undefined reference to `inflate'
content_encoding.c:(.text+0x674): undefined reference to `inflateEnd'
content_encoding.c:(.text+0x688): undefined reference to `inflateInit2_'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-hostip4.o): In function `Curl_ipv4_resolve_r':
hostip4.c:(.text+0x3c): undefined reference to `inet_pton'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-tftp.o): In function `tftp_rx':
tftp.c:(.text+0x1ac): undefined reference to `sendto'
tftp.c:(.text+0x244): undefined reference to `sendto'
tftp.c:(.text+0x2bc): undefined reference to `sendto'
tftp.c:(.text+0x318): undefined reference to `sendto'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-tftp.o): In function `tftp_tx':
tftp.c:(.text+0x720): undefined reference to `sendto'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-tftp.o):tftp.c:(.text+0x788): more undefined references to `sendto' follow
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-tftp.o): In function `tftp_connect':
tftp.c:(.text+0xa70): undefined reference to `bind'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-tftp.o): In function `tftp_state_machine':
tftp.c:(.text+0x10d4): undefined reference to `sendto'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-tftp.o): In function `tftp_multi_statemach':
tftp.c:(.text+0x12f8): undefined reference to `recvfrom'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-curl_addrinfo.o): In function `Curl_getaddrinfo_ex':
curl_addrinfo.c:(.text+0x1e8): undefined reference to `getaddrinfo'
curl_addrinfo.c:(.text+0x2e0): undefined reference to `freeaddrinfo'
curl_addrinfo.c:(.text+0x32c): undefined reference to `freeaddrinfo'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-curl_addrinfo.o): In function `Curl_str2addr':
curl_addrinfo.c:(.text+0x4f8): undefined reference to `inet_pton'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-curl_gethostname.o): In function `Curl_gethostname':
curl_gethostname.c:(.text+0x1c): undefined reference to `gethostname'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-ftp.o): In function `ftp_state_use_port':
ftp.c:(.text+0x9b8): undefined reference to `getsockname'
ftp.c:(.text+0x9d8): undefined reference to `inet_ntop'
ftp.c:(.text+0xaa4): undefined reference to `bind'
ftp.c:(.text+0xb20): undefined reference to `getsockname'
ftp.c:(.text+0xc10): undefined reference to `getsockname'
ftp.c:(.text+0xc20): undefined reference to `listen'
/opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-ftp.o): In function `AcceptServerConnect':
ftp.c:(.text+0xf7c): undefined reference to `getsockname'
ftp.c:(.text+0xfc8): undefined reference to `accept'
collect2: error: ld returned 1 exit status
/opt/devkitpro/libnx/switch_rules:79: recipe for target '/home/drew/Documents/switchcord/switchcord.elf' failed
make[1]: *** [/home/drew/Documents/switchcord/switchcord.elf] Error 1
Makefile:158: recipe for target 'build' failed
make: *** [build] Error 2
Curl error
-
- Site Admin
- Posts: 2004
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Curl error
Link order matters. Place -lcurl before -lnx in the LIBS line.
-
- Posts: 2
- Joined: Mon Jul 02, 2018 3:38 am
Re: Curl error
Thanks, I fixed that part, is there a way to fix the unsupported protocol error?
-
- Site Admin
- Posts: 2004
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Curl error
Curl needs rebuilt with support for https. Unfortunately it's not working right now and https connections still fail so currently the answer is no.
Who is online
Users browsing this forum: No registered users and 1 guest