Make errors with 3DS examples (2 undefined references)...

Post Reply
brandogg
Posts: 1
Joined: Mon Jan 05, 2015 6:15 pm

Make errors with 3DS examples (2 undefined references)...

Post by brandogg » Mon Jan 05, 2015 6:29 pm

Hello, I am attempting to build the 3DS examples included with libctru. I used the Windows installer to install devkitPro (1.5.4), then downloaded the latest zip from the libctru github, replaced the libctru directory contents in c:/devkitPro/ and copied the examples to c:/devkitPro/examples/3ds (following the lead of the other examples folders). When I run make (through cmd or through Programmer's Notepad), this is the output that I get:

> "make"
linking hello-world.elf
main.o: In function `main':
c:/devkitPro/examples/3ds/graphics/printing/hello-world/source/main.c:23: undefined reference to `gfxInitDefault'
c:/devkitPro/examples/3ds/graphics/printing/hello-world/source/main.c:27: undefined reference to `consoleInit'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/c/devkitPro/examples/3ds/graphics/printing/hello-world/hello-world.elf] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:01

That's running the Makefile inside of /examples/3ds/graphics/printing/hello-world/ but I get the same error on basically any Makefile I try to make in any of these examples.

The examples in the /nds/ directory work fine however, so I assume I have missed something somewhere, I'm just not sure what. I have just uninstalled and reinstalled devkitPro and have made no changes to the environment.

As a side note (and it hasn't gotten to this point yet), once I get this error sorted I want to compile .3dsx files since I'm using the Cubic Ninja exploit to run homebrew on my 3DSXL.

Thank you for your help and awesome toolchain. I have gone through the 12 pages of this forum and haven't seen this exact issue.

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

Re: Make errors with 3DS examples (2 undefined references)..

Post by WinterMute » Tue Jan 06, 2015 2:20 pm

You're attempting to compile examples for a later version of libctru than the one you have installed, you should have compiled & installed the version you got from github.

Having said that, I just rolled another libctru release so you can just run the updater and get the new one now.

I really should get around to adding examples to the updater but I'm working on a new devkitARM which I'm hoping to release fairly soon.
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest