TextReaderOverlay-NX icon indicating copy to clipboard operation
TextReaderOverlay-NX copied to clipboard

linking error when building

Open jimzrt opened this issue 5 years ago • 2 comments

Since the "Compatibility for libtesla 1.2.0" commit I get an error when linking. output: linking TextReaderOverlay-NX.elf /opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/9.2.0/../../../../aarch64-none-elf/bin/ld: cannot find -lharfbuzz /opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/9.2.0/../../../../aarch64-none-elf/bin/ld: cannot find -lglib-2.0 /opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/9.2.0/../../../../aarch64-none-elf/bin/ld: cannot find -lpcre /opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/9.2.0/../../../../aarch64-none-elf/bin/ld: cannot find -lgraphite2 collect2: error: ld returned 1 exit status this is due to libs added by pkg-config --libs --static freetype2 which gets -lfreetype -lbz2 -lz -lpng16 -lm -lm -lz -lharfbuzz -lm -lglib-2.0 -pthread -lpcre -pthread -lgraphite2

I did not find some of these dependencies in dkp-libs. Did you compile them yourself?

jimzrt avatar Mar 06 '20 15:03 jimzrt

workaround for me: replaced pkg-config --libs --static freetype2 with freetype-config --libs --static (with backticks). Same for CFLAGS.

jimzrt avatar Mar 06 '20 17:03 jimzrt

Thanks for reporting this, it was using pkg-config from core. I've updated the makefile as suggested and it should now build with dkp-libs/switch-freetype

diwo avatar Mar 10 '20 03:03 diwo