Building 3ds physic example

support for the ARM toolchain
Post Reply
sublimepoulpe
Posts: 2
Joined: Fri Jun 17, 2022 12:03 am

Building 3ds physic example

Post by sublimepoulpe » Fri Jun 17, 2022 1:59 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: Building 3ds physic example

Post by WinterMute » Mon May 01, 2023 6:26 pm

The intended way is to install 3ds-box2d from the devkitPro repositories & build the example normally. Depending on how you installed the tools & your host os this could be either dkp-pacman or pacman & may necessitate sudo if not on windows. You can search the repositories with -Ss like this

Code: Select all

$ dkp-pacman -Ss box2d
dkp-libs/3ds-box2d 2.4.1-1 (3ds-portlibs) [installed]
    Box2D is a 2D physics engine for games.
dkp-libs/ppc-box2d 2.4.1-2 (ppc-portlibs) [installed]
    Box2D is a 2D physics engine for games.
dkp-libs/switch-box2d 2.4.1-1 (switch-portlibs) [installed]
    Box2D is a 2D physics engine for games.
Then install (using sudo if needed) like this

Code: Select all

$ sudo dkp-pacman -S 3ds-box2d
[sudo] password for davem: 
warning: 3ds-box2d-2.4.1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) 3ds-box2d-2.4.1-1

Total Download Size:   0.14 MiB
Total Installed Size:  0.70 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 3ds-box2d-2.4.1-1-any                                             139.0 KiB   463 KiB/s 00:00 [########################################################] 100%
(1/1) checking keys in keyring                                                                 [########################################################] 100%
(1/1) checking package integrity                                                               [########################################################] 100%
(1/1) loading package files                                                                    [########################################################] 100%
(1/1) checking for file conflicts                                                              [########################################################] 100%
(1/1) checking available disk space                                                            [########################################################] 100%
:: Processing package changes...
(1/1) reinstalling 3ds-box2d  
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests