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?
NDS static library not compiling
-
- Posts: 3
- Joined: Sun Feb 05, 2012 1:28 pm
Re: NDS static library not compiling
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.
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.
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: NDS static library not compiling
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 :-
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
Who is online
Users browsing this forum: No registered users and 1 guest