Homebrew Total noob needs help compiling a 3DS game

  • Thread starter Thread starter Advil_Lavs
  • Start date Start date
  • Views Views 1,785
  • Replies Replies 26

Advil_Lavs

Active Member
Newcomer
Joined
May 27, 2025
Messages
27
Reaction score
5
Trophies
0
Age
25
XP
111
Country
Bulgaria
Okay, I wanted to compile the 3DS port of Sonic Robo Blast 2. I managed to get all tools but I cannot use the makerom command for some reason. Just running make gives me a lot of errors. What I have sent is just half of the output since I don't know what I am doing really.
I've had a lot of trouble compiling programs before but this time I feel like I'm close to the end. If you have compiled 3DS homebrew apps before, please tell me what I am doing wrong and if you need anything else to see what I am doing wrong.
 

Attachments

  • code.png
    code.png
    146 KB · Views: 149
Generally you can ignore stuff that says "warning". Try to find something in the output that actually says "Error"; that would be a good starting point.

An even better starting point is of course to actually look at the instructions. Did you do that..?
https://github.com/derrekr/srb2_3ds

If it says you need to "Build and install this fork of the citro3d 3DS graphics library", then sadly you're probably going to have to build and install that fork.
 
I did look at the instructions and I have installed all the tools. There is a single error which does not look something I have caused.

C:/devkitpro/srb2_3ds/source/d_netfil.c:406:30: error: implicit declaration of function 'stricmp'; did you mean 'strncmp'? [-Wimplicit-function-declaration]
406 | if (!stricmp(wadfilename, fileneeded.filename) &&
 
The next thing to try is to look at the open issues, but there doesn't seem to be anything to that effect. You may consider opening an issue – if you're quite sure you've followed all the instructions.
https://github.com/derrekr/srb2_3ds/issues

If you're feeling adventurous, you can always try editing the source yourself? A moment of searching suggests you could try changing that line to read "strnicmp".
 
I will try fixing that issue myself then. Another question, when trying to make a rom do I first have to run make and then makerom? Trying to run makerom just gives me "command not found", I feel like I'm still missing something.

Update: changing "stricmp" to "strncmp" did not solve the issue.
 
Another question, when trying to make a rom do I first have to run make and then makerom? Trying to run makerom just gives me "command not found", I feel like I'm still missing something.
You said you read the instructions, right..? It says "makerom is required for building cia".

Update: changing "stricmp" to "strncmp" did not solve the issue.
First, read my post again.

Second, "did not solve the issue" is vague. Does that mean you are still getting a similar error?
 
  • Like
Reactions: Advil_Lavs
You said you read the instructions, right..? It says "makerom is required for building cia".

First, read my post again.

Second, "did not solve the issue" is vague. Does that mean you are still getting a similar error?
First, I read that I need makerom, I just didn't understand what it was until now. Second, me changing something in the code caused more issues while the existing one remained.
 
strncmp has a different prototype (it expects two strings and a number specifying how many positions to compare), so the intended call is incorrect. You could try strcasecmp.

(It seems stricmp is a nonstandard function, maybe in earlier versions of the compiler or the Makefile flags this was ignored with just a Warning.)

Either way, try compiling a different 3DS project just to make sure you have correctly set up the tools :)
 
  • Like
Reactions: Advil_Lavs
Second, me changing something in the code caused more issues while the existing one remained.
If it caused more issues, then it would be helpful to know more about the new issues that were caused.

More importantly, I'm not sure you did read my post. :glare:
A moment of searching suggests you could try changing that line to read "strnicmp".
(But strcasecmp might very well be worth a try as well.)
 
  • Like
Reactions: splaca
strnicmp is not a drop-in replacement for stricmp since it expects an additional parameter, and also it is nonstandard just as stricmp.

I think you're on the right track tho that this call probably needs to be changed.
I think strcasecmp could work but I can't check right now because I'm not on my personal computer.
 
Okay, changing strncmp to strcasecmp on live 406 seems to have fixed the issue since the line no longer shows in the compiler errors/warnings but it caused line 545 to receive the same error as 406. Replacing that one with strcasecmp causes the issue on line 5148 and so on. If all of this actually helps solve the issues I am going to write back once I'm done with it. If not, I am going to tell you what other errors have appeared.
 
If stricmp is used in multiple places, you'll need to change every occurence. Code editors usually have functionalities to do such widespread substitutions
 
Okay, after replacing every strncmp a lot of conflicting code came up from p_enemy.c and info.h. The screenshot shows a few of them but I think they all have the same issue, it might even be something similar to the last one but that's still way above my level of understanding.
1748375182958.png
 
Well, so much for a simple fix.

As suggested, it is distinctly possible that earlier versions of the compiler – or some other component of the tools – did not have these problems with stricmp, etc. If that is the case, then the solution would be to track down an older version of the compiler.

Unfortunately, it's not clear exactly which component you're going to have to substitute and what version of that component you're going to have to look for. https://github.com/derrekr/srb2_3ds/issues/17 suggests whatever it is will have to be something from late 2023.

(Sadly, things like this are all too common when you try to build someone else's code.)
 
Well then, tomorrow I will try to find the right compiler and tools and I will write back with what I've managed to do.
 
(Sadly, things like this are all too common when you try to build someone else's code.)

Yeah, it's unfortunate that even when no further changes are made to the code, it can stop compiling due to the tooling having evolved (and often become more strict).

Well then, tomorrow I will try to find the right compiler and tools and I will write back with what I've managed to do.

I'll try to take a look at this project too when I can. Would be nice to have it compiling again with the current DevkitPro.
 
Since I did not find the right version of the software used to compile this game, I'm going to ask the creator. Thank you for helping me find what's wrong.
 
Alright, although I haven't gotten that far.
What I did is install devkiPro.
Install 3ds-sdl and 3ds-sdl_mixer from the pacman command.
Build the citro3d fork provided in the github building instructions (I haven't had issues building that).
Makerom is on the 3dbrew website (shows up when you search makerom).
Changed every instance of "stricmp" in the .c files which gave an error with "strcasecmp".
Run make in mingw32.
At this point it shows conflicting errors in p_enemy.c and info.h. The real reason it might not compile is in the version of one of the tools I'm using. The code hasn't been updated since December 2023, seemingly enough time for those tools to change enough and break older code.
 

Site & Scene News

Popular threads in this forum