How to link library to 3ds application

Post Reply
The Glitch
Posts: 8
Joined: Thu Jul 11, 2024 8:46 pm

How to link library to 3ds application

Post by The Glitch » Thu May 29, 2025 1:31 am

I have a 3ds homebrew library that I can compile into an .a file and several .hpp files. I couldn't figure out how to properly link it, so I've just been copying the source and include files into the application. This is super impractical so I want to actually link it.


WinterMute
Site Admin
Posts: 2062
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: How to link library to 3ds application

Post by WinterMute » Sun Jun 15, 2025 4:03 pm

add the path to your library in the Makefile here. You should have a folder there named include containing your .hpp files & a folder named lib containing your .a

The provided [library template](already has the necessary structure) so if you used that and it was in your filesystem at ~/projects/3ds/my3ds/lib then just add that path to the LIBDIRS line and your library to LIBS

Code: Select all

LIBS	:= -lmy3dslib -lctru -lm

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS	:= ~/projects/3ds/my3dslib $(CTRULIB)
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests