Physics Example Build

Post Reply
sublimepoulpe
Posts: 2
Joined: Fri Jun 17, 2022 12:03 am

Physics Example Build

Post by sublimepoulpe » Fri Jun 17, 2022 1:55 am

Hi !

I've been trying to build the physic 3ds example based on box2d.
I'll try to explain my train of thought.

It requires box2d so I cloned it from this repo.
I compiled it with the provided script, but it creates libs for my machine and not for 3ds hardware. (Adding the include folder and the generated libbox2d.a to the example Makefile result in an error.)
So I tried tinkering with the CMakeList.txt to force the use of arm-none-eabi-g++, but it (obviously) does't work and seems super hacky (pretty close to black magic).

What's the intended way to build this example ?

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

Re: Physics Example Build

Post by WinterMute » Thu Apr 20, 2023 11:43 am

We should really add instructions for examples dependent on the various portlibs we distribute.

Basically you open your terminal and use pacman to install 3ds-box2d then just type make. How you do that depends slightly on the OS where you installed the tools. So for msys2 on windows that would be

Code: Select all

pacman -S 3ds-box2d
If it's a linux distro with its own pacman (i.e. arch & derivatives, Fedora) you'll need to add sudo in front

Code: Select all

sudo pacman -S 3ds-box2d
If it's a system where you used the devkitPro apt repository to install devkitPro pacman then you need to add a dkp- prefix

Code: Select all

sudo dkp-pacman -S 3ds-box2d
Make will then build the example fine.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests