Homebrew Homebrew Development

trainboy2019

Well-Known Member
Member
Joined
Oct 6, 2015
Messages
1,114
Trophies
0
Age
23
Location
GA
XP
1,107
Country
United States
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);

^
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,036
Country
Italy
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.
 

trainboy2019

Well-Known Member
Member
Joined
Oct 6, 2015
Messages
1,114
Trophies
0
Age
23
Location
GA
XP
1,107
Country
United States
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?
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,036
Country
Italy
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.
 

trainboy2019

Well-Known Member
Member
Joined
Oct 6, 2015
Messages
1,114
Trophies
0
Age
23
Location
GA
XP
1,107
Country
United States
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
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,036
Country
Italy
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.
 

nop90

Well-Known Member
Member
Joined
Jan 11, 2014
Messages
1,556
Trophies
0
Location
Rome
XP
3,036
Country
Italy
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

NicknameGoesHere

RIP my sanity: 2018-2018
Member
Joined
Jul 11, 2017
Messages
243
Trophies
0
XP
230
Country
United States
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.
 

trainboy2019

Well-Known Member
Member
Joined
Oct 6, 2015
Messages
1,114
Trophies
0
Age
23
Location
GA
XP
1,107
Country
United States
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.
 

trainboy2019

Well-Known Member
Member
Joined
Oct 6, 2015
Messages
1,114
Trophies
0
Age
23
Location
GA
XP
1,107
Country
United States
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

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: https://youtu.be/3eGAHfC5P-Y?si=Fo3iEl1pZ4D_O6dp +1