How do I compile for Switch / LibNX / switch-dev with libcurl

obnoxiousmods

Well-Known Member
Newcomer
Joined
Jul 8, 2024
Messages
50
Reaction score
7
Trophies
0
Age
28
XP
210
Country
Canada
https://github.com/switchbrew/switch-examples/blob/master/network/curl/source/main.c

I am trying to compile this on my arch linux WSL2 and it gives me
/home/o/testLIBNX/source/main.c:9:10: fatal error: curl/curl.h: No such file or directory
9 | #include <curl/curl.h>
| ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [/opt/devkitpro/devkitA64/base_rules:22: main.o] Error 1
make: *** [Makefile:167: build] Error 2

even tho curl/curl.h does exist at /usr/include/curl/curl.h

I am a novice with C/C++ but not sure how I can fix, I thought libcurl might not work at all because I dont think there is a version officially for switch but the examples imply it should, not sure what im doing wrong :(
 
If you have everything set up right, you only need to type sudo pacman -S switch-curl in your terminal.
 

Site & Scene News

Popular threads in this forum