Page 1 of 1
I installed 3ds-curl, but include won't find it.
Posted: Mon Oct 07, 2019 5:30 pm
by enthusiasticGeek
I installed 3ds-curl, but when attempting it make my app it says
Code: Select all
fatal error: curl/curl.h: No such file or directory
.
When including it, I have it set to
, which is what it says to do in the libcurl examples. Is it possible I'm supposed to include it from somewhere else? I am using an Ubuntu x64 machine. I'm a complete beginner to making homebrew applications and devkitPro.
3ds-curl (libcurl) gives me "undefined reference to" errors
Posted: Tue Oct 08, 2019 7:57 pm
by enthusiasticGeek
I posted earlier about how I installed 3ds-curl but make couldn't find it. Since then, I fixed it by adding
-I/opt/devkitpro/portlibs/3ds/include/ to the
INCLUDE variable within the Makefile. However, now I am getting multiple
undefined reference to errors. Here is the complete make output starting with it linking Project.elf:
Code: Select all
linking Project.elf
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: main.o: in function `main':
/home/sam/Downloads/Project/source/main.c:107: undefined reference to `curl_global_init'
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: /home/sam/Downloads/Project/source/main.c:108: undefined reference to `curl_easy_init'
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: /home/sam/Downloads/Project/source/main.c:110: undefined reference to `curl_easy_setopt'
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: /home/sam/Downloads/Project/source/main.c:111: undefined reference to `curl_easy_setopt'
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: /home/sam/Downloads/Project/source/main.c:112: undefined reference to `curl_easy_setopt'
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: /home/sam/Downloads/Project/source/main.c:113: undefined reference to `curl_easy_setopt'
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: /home/sam/Downloads/Project/source/main.c:114: undefined reference to `curl_easy_setopt'
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: /home/sam/Downloads/Project/source/main.c:116: undefined reference to `curl_easy_perform'
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: /home/sam/Downloads/Project/source/main.c:117: undefined reference to `curl_easy_cleanup'
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: /home/sam/Downloads/Project/source/main.c:119: undefined reference to `curl_global_cleanup'
collect2: error: ld returned 1 exit status
/opt/devkitpro/devkitARM/3ds_rules:41: recipe for target '/home/sam/Downloads/Project/Project.elf' failed
make[1]: *** [/home/sam/Downloads/Project/Project.elf] Error 1
Makefile:167: recipe for target 'all' failed
make: *** [all] Error 2
This time, I really am completely stuck!
Re: 3ds-curl (libcurl) gives me "undefined reference to" errors
Posted: Mon Oct 21, 2019 11:47 pm
by WinterMute
Add $(PORTLIBS) to the LIBDIRS variable here
https://github.com/devkitPro/3ds-exampl ... kefile#L66
Add
to CFLAGS at
https://github.com/devkitPro/3ds-exampl ... kefile#L49
i.e.
Code: Select all
CFLAGS := -g -Wall -O2 -mword-relocations \
-fomit-frame-pointer -ffunction-sections \
`curl-config --cflags`
$(ARCH)
replace
at
https://github.com/devkitPro/3ds-exampl ... kefile#L60 with