3ds homebrew app help!

Discussion in '3DS - Homebrew Development and Emulators' started by Cjmcgiv, Aug 6, 2016.

  1. Cjmcgiv
    OP

    Cjmcgiv GBAtemp Regular

    Member
    126
    21
    Jul 31, 2016
    Canada
    I am trying to make a simple homebrew application using this tutorial:


    When I open the file in the command prompt and use the make command I get this result,
    make[1]: /c/Users/MyName: No such file or directory
    make[1]: ***no rule to make target ' /c/Users/MyName/'. Stop.
    make: *** [build] Error 2
    And yes I do have DevKitPro installed.

    Can anyone help me fix this issue?
     
  2. Mnecraft368

    Mnecraft368 GBAtemp Advanced Fan

    Member
    902
    215
    Aug 8, 2015
    1. its should be C:\ not /c/ and also if it was it would be \c\
    2. make sure it is your profile user name not MyName. go to file explorer, local disk c:\ or something like that... then go to users folder and look for your user and thats what you put there.
    3. Third reason

    — Posts automatically merged - Please don't double post! —

    btw that tutorial is a bit out of date, my things seem to loop and doesnt work very well. Hope yours works
     
    Tomato Hentai likes this.
  3. elhobbs

    elhobbs GBAtemp Advanced Fan

    Member
    806
    296
    Jul 28, 2008
    United States
    A common reason for this error is having spaces in the path. The toolset cannot handle directories with a space in the name.
    btw - /c/ is correct. The toolset is built using msys which is a UNIX type shell/env for Windows. As such it references paths a little differently than Windows natively. The drive references ( /c/ instead of c:\ ) and / instead of \ are the main differences.
     
  4. Cjmcgiv
    OP

    Cjmcgiv GBAtemp Regular

    Member
    126
    21
    Jul 31, 2016
    Canada
    So do you have a fix? Or a new way of compiling it?
     
    Last edited by Cjmcgiv, Aug 6, 2016
  5. elhobbs

    elhobbs GBAtemp Advanced Fan

    Member
    806
    296
    Jul 28, 2008
    United States
    I was referring to spaces in the path to your project. The solution is to make it so there are no spaces in the path to the project - so either move or rename your project.
     
  6. Cjmcgiv
    OP

    Cjmcgiv GBAtemp Regular

    Member
    126
    21
    Jul 31, 2016
    Canada
    I have done this but now when I run the make command I get the errors:

    unnexpected ';' before 'while'
    while <aptMainLoop<>>
    ^
    make[1]: *** [main.o] Error 1
    make: *** [build] Error 2

    If it helps here is my code:

    #include <string.h>
    #include <stdio.h>
    #include <3ds.h>

    int main()
    {
    gfxInitDefault();
    //gfxSet3D(true); //Uncomment if using stereoscopic 3D
    consoleInit(GFX_TOP, NULL) //Change this line to consoleInit(GFX_BOTTOM, NULL) if using the bottom screen.

    // Main loop
    while (aptMainLoop())
    {
    gspWaitForVBlank();
    hidScanInput();

    printf("Words")

    u32 kDown = hidKeysDown();
    if (kDown & KEY_START)
    break; //Break in order to return to hbmenu

    // Flush and swap frame-buffers
    gfxFlushBuffers();
    gfxSwapBuffers();
    }

    gfxExit();
    return 0;
    }

    — Posts automatically merged - Please don't double post! —

    Thanks for the help, the "MyName" is my profile username, this was just to hide my real name.
     
  7. elhobbs

    elhobbs GBAtemp Advanced Fan

    Member
    806
    296
    Jul 28, 2008
    United States
    you have 2 calls to consoleInit and neither statement is terminated with a ";". You probably only want one of these calls - likely just the second call. Although, since you are not calling printf it is not really needed at all.
     
  8. Cjmcgiv
    OP

    Cjmcgiv GBAtemp Regular

    Member
    126
    21
    Jul 31, 2016
    Canada
    Wut. I don't understand what your saying (sorry im such a noob, C is not a language im used to i'm more of a python guy myself.)

    And the printf statement is so that when you run the program somthing apperars on screen to let me know that it worked.
     
    Last edited by Cjmcgiv, Aug 7, 2016
  9. elhobbs

    elhobbs GBAtemp Advanced Fan

    Member
    806
    296
    Jul 28, 2008
    United States
    Sorry, looking at this on my phone - missed you printf call. In any case the error is still the same. C syntax requires a terminating ";" for each statement.
    That being said - learning C on a platform with a decent debugger is a lot easier. Windows, Linux, or Apple - doesn't really matter thaey all have better tools for debugging. Though you are still at the syntax stage.
    You could also just look at the original source from the template/example and see what you broke with your changes.
     
  10. Cjmcgiv
    OP

    Cjmcgiv GBAtemp Regular

    Member
    126
    21
    Jul 31, 2016
    Canada
    Ok thanks!
     
  11. Kartik

    Kartik Gbatemp advanced fan

    Member
    348
    256
    Jun 6, 2015
    India
    github
  12. Cjmcgiv
    OP

    Cjmcgiv GBAtemp Regular

    Member
    126
    21
    Jul 31, 2016
    Canada