NDS static library not compiling

support for the ARM toolchain
Post Reply
halofreak1990
Posts: 3
Joined: Sun Feb 05, 2012 1:28 pm

NDS static library not compiling

Post by halofreak1990 » Tue Feb 07, 2012 1:24 am

When I try to compile a static library, the makefile refuses to pick up any file other than the template .cpp file.
When I tried removing the template.cpp file, since I'd already written other .cpp file, and tried a recompile, it produced an empty .a library.

I haven't modified the Makefile, so what could be wrong here?

As a side note, I'm using VS2010, and I can compile NDS binaries, so the toolchain works as it should.
Could it be because I have both a NDS game and an NDS static library project in the same Solution?

halofreak1990
Posts: 3
Joined: Sun Feb 05, 2012 1:28 pm

Re: NDS static library not compiling

Post by halofreak1990 » Sun Feb 19, 2012 1:31 pm

Ok, I figured out the problem; I made subdirectories in the /source folder of my library project, which contained my .cpp files.
the devkitPro Makefiles do not pick up source files from subdirectories.
Moving the files back into the root of the /source directory fixed it.

I feel so stupid... I've been working with OpenXDK for several years, which also uses a GNU toolchain, and that, too, doesn't search subdirectories for source files.

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

Re: NDS static library not compiling

Post by WinterMute » Tue Feb 21, 2012 2:50 pm

Actually it is possible to get the Makefiles to pick up files in subdirectories of the source folder, we just didn't automate this process because it can cause some issues for people who don't expect it to happen.

add your subdirectories to the SOURCES variable in the Makefile, noting that all paths are relative to the Makefile, for instance :-

Code: Select all

SOURCES		:=	source source/subdir1 source/subdir2
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests