undefined reference with curl
Posted: Wed May 10, 2023 4:21 pm
I am trying to build a homebrew switch app in which I need amongst others to make requuests to https endpoints. For this purpose I use curl, but I get undefined references errors to random number generators:
I even tried with a very similar code to https://github.com/switchbrew/switch-ex ... twork/curl but get the same error. I don't really know what the issue is as I think that I installed all the right packages.
Any help is appreciated, thanks in advance
Code: Select all
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld: /opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-libnx.o): in function `Curl_libnx_random':
libnx.c:(.text.Curl_libnx_random+0x10): undefined reference to `csrngGetRandomBytes'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld: /opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-libnx.o): in function `Curl_libnx_cleanup':
libnx.c:(.text.Curl_libnx_cleanup+0x8): undefined reference to `csrngExit'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.1.0/../../../../aarch64-none-elf/bin/ld: /opt/devkitpro/portlibs/switch/lib/libcurl.a(libcurl_la-libnx.o): in function `Curl_libnx_init':
libnx.c:(.text.Curl_libnx_init+0x24): undefined reference to `csrngInitialize'
collect2: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/libnx/switch_rules:80: XXX.elf] Error 1
make: *** [Makefile:168: build] Error 2
Any help is appreciated, thanks in advance