Homebrew Can't build app; need help!

jeffyTheHomebrewer

Neato Burrito!
OP
Member
Joined
Aug 24, 2018
Messages
1,360
Trophies
1
Location
his house!
Website
catboybeebop.neocities.org
XP
2,669
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
28
XP
213
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,360
Trophies
1
Location
his house!
Website
catboybeebop.neocities.org
XP
2,669
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;
}
 
General chit-chat
Help Users
  • Skelletonike @ Skelletonike:
    1H left, such a slow week.
  • Sonic Angel Knight @ Sonic Angel Knight:
    Okay, I had spaghetti :P
  • SylverReZ @ SylverReZ:
    Hope they made lots of spaget
  • K3N1 @ K3N1:
    Chill dog
  • SylverReZ @ SylverReZ:
    Chilli dog
  • Skelletonike @ Skelletonike:
    Damn, I'm loving the new zelda.
  • xtremegamer @ xtremegamer:
    loving the new zelda, i started a game, it was so fucking good, so i
    am waiting on my friend to get home so we can start a new one together
  • Skelletonike @ Skelletonike:
    I just dislike that they don't let me choose the voices before the game starts. Happened with botw as well, had to change to japanese and restart.
  • K3N1 @ K3N1:
    But the important question is can you choose gender
  • Skelletonike @ Skelletonike:
    Same way you can choose Gerald's gender.
  • Skelletonike @ Skelletonike:
    *Geralt, damn autocorrect.
  • Psionic Roshambo @ Psionic Roshambo:
    But can he be trans? Lol
  • K3N1 @ K3N1:
    Zelda transforms into link
  • Psionic Roshambo @ Psionic Roshambo:
    Link I'm not the princess your looking for.... *Pulls a crying game*
  • K3N1 @ K3N1:
    *skirt up* it's exactly what I always wanted
  • Skelletonike @ Skelletonike:
    Just scanned all my zelda amiibos, took a while but didn't get anything that cool, did get the lon lon ranch hylian fabrics though.
  • Skelletonike @ Skelletonike:
    It was pretty funny when I scanned wolf link and got a shit load of meat.
  • K3N1 @ K3N1:
    @Skelletonike, btw I ran that custom for mgs4 on the deck I'm amazed it got that far in game
  • K3N1 @ K3N1:
    Plug in*
  • K3N1 @ K3N1:
    Your favorite activity
  • BentlyMods @ BentlyMods:
    My fav actvity is:

    mario-dancing.gif
    BentlyMods @ BentlyMods: My fav actvity is: