Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,475,057
  • Replies Replies 6,048
  • Likes Likes 54
Could someone help? I keep getting this error when I run make.
/Users/user/Desktop/3DSBREWMAKER/Platformer/source/jsoncpp.cpp: In function 'void Json::throwRuntimeError(const string&)':

/Users/user/Desktop/3DSBREWMAKER/Platformer/source/jsoncpp.cpp:2618:25: error: exception handling disabled, use -fexceptions to enable

throw RuntimeError(msg);

^
 
Could someone help? I keep getting this error when I run make.
/Users/user/Desktop/3DSBREWMAKER/Platformer/source/jsoncpp.cpp: In function 'void Json::throwRuntimeError(const string&)':

/Users/user/Desktop/3DSBREWMAKER/Platformer/source/jsoncpp.cpp:2618:25: error: exception handling disabled, use -fexceptions to enable

throw RuntimeError(msg);

^

You can't sue exceptions with 3ds toolchain configuration.

You can try to change the code using old style error handling.
 
You can't sue exceptions with 3ds toolchain configuration.

You can try to change the code using old style error handling.
I was asking what does this error mean, what caused it, and how can I fix it? Also, what's old style error handling? Try/catch blocks?
 
I was asking what does this error mean
this means that in the code you can'y use exceptions (i.e try/catch)

what caused it
the -fno-exceptions in your makefile

and how can I fix it?
you can't (at least if ctrulib isn't deeply changed in the last six months). If you don't beleve me, remove the -fno-exceptions flag.

Also, what's old style error handling? Try/catch blocks?
old style is to use some integer return values (usually negative ones) to signal an error inside a function. An other ugly method could be to use global variables, but do this only as last option.
 
this means that in the code you can'y use exceptions (i.e try/catch)


the -fno-exceptions in your makefile


you can't (at least if ctrulib isn't deeply changed in the last six months). If you don't beleve me, remove the -fno-exceptions flag.


old style is to use some integer return values (usually negative ones) to signal an error inside a function. An other ugly method could be to use global variables, but do this only as last option.
I just pushed the source to github, if you could tell me where I went wrong, that would be very helpful. https://github.com/trainboy2019/Platformer
 
I just pushed the source to github, if you could tell me where I went wrong, that would be very helpful. https://github.com/trainboy2019/Platformer
I don't like to be rude, and usually I try to give all the support I can, but this is the third time you ask the same thing.

You are wrong exactly in the point reported by the compiler:
Code:
/Users/user/Desktop/3DSBREWMAKER/Platformer/source/jsoncpp.cpp:2618:25: error: exception handling disabled, use -fexceptions to enable

throw RuntimeError(msg);

I hope you can read it. It reports:
- file jsoncpp.cpp
- row 2618
- col 25

the problem is using throwRuntimeError(...), and it's used in several points (only the first one is reported).

As I already said, you can't use exceptions, and throwRuntimeError(...) throws an exception :O.

For learning what's an exceprion, use google

PS: sorry to be have been rude, today is a bad day and I need someone to (virtually) punch :rofl2:. If you need ask more.

PPS: for a quick and dirty hack, try to comment all the throwRuntimeError(...). This way error handling will be disabled (with the risk of the app crashing), but you could be lucky.
 
Still can't find anything, and google never seems to help with this, or maybe i just don't know what to google. Can nop90 or anyone really refer me to a place where I can learn to fix this problem, or really any homebrew problem in general? Docs would be great.

just googled for "site:gbatemp.net nop90 home menu homebrew developement"

what you need is here https://gbatemp.net/threads/homebrew-development.360646/page-264#post-6968395

you have to pause music after
Code:
case APTHOOK_ONSUSPEND:

if you set a global variable to true there, in the mainloop you can check if the music is paused (just in case the game is restored after pressing home) and make it start again, clearing the global variable obviously.
It's a code example. there is no advanced tutorial for coding on 3ds. Sorry.
 
Last edited by nop90,
  • Like
Reactions: Enovale
Every time I try to use Code::Blocks to try to build and run my program, I get the error "/c/devkitPRO/devkitARM/3ds_rules: No such file or directory." I checked, and the file 3ds_rules is in the C/devkitPro/devkitARM directory.
 
Every time I try to use Code::Blocks to try to build and run my program, I get the error "/c/devkitPRO/devkitARM/3ds_rules: No such file or directory." I checked, and the file 3ds_rules is in the C/devkitPro/devkitARM directory.
Do you have the path variable set? I think that's how it works on windows.
 
Ok, I fixed that problem. Now, whenever I try to build and run in citra, I always get the error "recipe for target 'citra' failed."
 
What's the best way to generate random numbers 1-4?
This is what I have now.
Code:
    default_random_engine engine;
    uniform_int_distribution<int> distributor(1,4);
    key=distributor(engine);
But it generates the same random numbers in the same order every time.
 

Site & Scene News

Popular threads in this forum