Homebrew Can't build app; need help!

jeffyTheHomebrewer

Neato Burrito!
OP
Member
Joined
Aug 24, 2018
Messages
1,624
Trophies
1
Location
his house!
Website
catboybeebop.neocities.org
XP
3,500
Country
United States
Back story: I plan to get my aqua blue 3DS repaired so I can give it to my mom. I wanted to make this app to give her info on how to use it.
I got the DSP1 app source code, (by @zoogie) and when I run Build.bat I get this:

C:\Users\jeffy\Desktop\Ozocodes\DSP1-master\DSP1-master>make
main.c
arm-none-eabi-gcc -MMD -MP -MF /home/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-mas
ter/build/main.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-mat
h -march=armv6k -mtune=mpcore -mfloat-abi=hard -I/home/jeffy/Desktop/Ozocodes/DS
P1-master/DSP1-master/include -I/opt/devkitpro/libctru/include -I/home/jeffy/Des
ktop/Ozocodes/DSP1-master/DSP1-master/build -DARM11 -D_3DS -c /home/jeffy/Deskto
p/Ozocodes/DSP1-master/DSP1-master/source/main.c -o main.o
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:1:8: warni
ng: unknown escape sequence: '\H'
printf("\n\Hi! I put some demos and things on this system for you.\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:1:8: error
: expected declaration specifiers or '...' before string constant
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:3:9: warni
ng: unknown escape sequence: '\040'
printf("\n\ Your NNID and NNID password are in the box. \n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:3:9: error
: expected declaration specifiers or '...' before string constant
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:4:10: warn
ing: unknown escape sequence: '\040'
printf("\n\ Also, Pictochat is not normally instaled on 3DS systems. ;P\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:4:10: erro
r: expected declaration specifiers or '...' before string constant
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:6:9: warni
ng: unknown escape sequence: '\040'
printf("\n\ If you need help, just ask me.\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:6:9: error
: expected declaration specifiers or '...' before string constant
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:10:2: erro
r: expected identifier or '(' before 'while'
while(screen_char_total--)printfprintf("\x1b[0;0H"); //back to white text and
cursor to top left corner
^~~~~
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:11:10: war
ning: unknown escape sequence: '\A'
printf("\n\A: Self-Distruct this app then exit to home menu.\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:11:10: err
or: expected declaration specifiers or '...' before string constant
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:13:2: erro
r: expected identifier or '(' before 'while'
while (aptMainLoop())
^~~~~
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:35:2: warn
ing: data definition has no type or storage class
gfxExit();
^~~~~~~
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:35:2: warn
ing: type defaults to 'int' in declaration of 'gfxExit' [-Wimplicit-int]
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:36:2: erro
r: expected identifier or '(' before 'return'
return 0;
^~~~~~
C:/Users/jeffy/Desktop/Ozocodes/DSP1-master/DSP1-master/source/main.c:37:1: erro
r: expected identifier or '(' before '}' token
}
^
make[1]: *** [/opt/devkitpro/devkitARM/base_rules:85: main.o] Error 1
make: *** [Makefile:147: build] Error 2

C:\Users\jeffy\Desktop\Ozocodes\DSP1-master\DSP1-master>bannertool makebanner -i
"cia/banner.png" -a "cia/audio.wav" -o "cia/banner.bnr"
Created banner "cia/banner.bnr".

C:\Users\jeffy\Desktop\Ozocodes\DSP1-master\DSP1-master>bannertool makesmdh -i "
cia/icon.png" -l "DSP1 - dsp firm dumper" -s "DSP1" -p "zoogie" -o "cia/icon.icn
"
Created SMDH "cia/icon.icn".

C:\Users\jeffy\Desktop\Ozocodes\DSP1-master\DSP1-master>makerom -f cia -o DSP1.c
ia -rsf cia/template.rsf -target t -elf DSP1.elf -icon cia/icon.icn -banner cia/
banner.bnr -exefslogo
[NCCH ERROR] Failed to open elf file 'DSP1.elf'
[NCCH ERROR] NCCH Build Process Failed
[RESULT] Failed to build outfile

C:\Users\jeffy\Desktop\Ozocodes\DSP1-master\DSP1-master>pause
Press any key to continue . . .


Note: I have no experience with C/C++, so I of course don't know what most of the code means, so please, tell me what I need to fix!
 

DeadPhoenix8091

Member
Newcomer
Joined
Jan 13, 2019
Messages
21
Trophies
0
Age
29
XP
223
Country
Germany
Please supply the main.c source code. Without it we will have to guess what you did based on the error output.

At first glance it looks like you made 2 mistakes:

1. You placed the printfs at the wrong place, You probably want to place them in the "int main" function.
2. Some of your printfs have an additional Backslash after the \n,
 

jeffyTheHomebrewer

Neato Burrito!
OP
Member
Joined
Aug 24, 2018
Messages
1,624
Trophies
1
Location
his house!
Website
catboybeebop.neocities.org
XP
3,500
Country
United States
Please supply the main.c source code. Without it we will have to guess what you did based on the error output.

At first glance it looks like you made 2 mistakes:

1. You placed the printfs at the wrong place, You probably want to place them in the "int main" function.
2. Some of your printfs have an additional Backslash after the \n,
ah, Okay. Here's the main.c: (sorry that I need to copy/paste it but gbatemp won't let me attach it)
printf("\n\Hi! I put some demos and things on this system for you.\n");

printf("\n\ Your NNID and NNID password are in the box. \n");
printf("\n\ Also, Pictochat is not normally instaled on 3DS systems. ;P\n");

printf("\n\ If you need help, just ask me.\n");



while(screen_char_total--)printfprintf("\x1b[0;0H"); //back to white text and cursor to top left corner
printf("\n\A: Self-Distruct this app then exit to home menu.\n");
// Main loop
while (aptMainLoop())
{
hidScanInput();

u32 kDown = hidKeysDown();
else if (kDown & KEY_A)
{
amInit();
res = AM_DeleteAppTitle(MEDIATYPE_SD, (u64)0x0004000000D59100);
if(res) printf("\nSelf-Disruct failed, Curse you perry the platipuss!!\n");
else printf("\nSelf-Disruct success!\n");
svcSleepThread(500*1000*1000);
break;
}

// Flush and swap framebuffers
gfxFlushBuffers();
gfxSwapBuffers();
gspWaitForVBlank();
}

// Exit services
gfxExit();
return 0;
}
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/sGvT5FKSiyk?si=TYqsdjjbF-4N8Xc8