[fixed]gcc compile error in irrString.h ("trunk 5723")

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
AReichl
Posts: 269
Joined: Wed Jul 13, 2011 2:34 pm

[fixed]gcc compile error in irrString.h ("trunk 5723")

Post by AReichl »

Does not know 'isdigit' in irrString.h.

I REALLY don't understand this, because "trunk 5721" compiled fine,
and there are no differences to cause this sudden change.
( tryed it from gcc_6.4.0 up ).

I have added

#if defined(__GNUC__)
#include <cctype> // isdigit
#endif

at the beginning of irrString.h
CuteAlien
Admin
Posts: 9646
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: gcc compile error in irrString.h ("trunk 5723")

Post by CuteAlien »

Thanks for reporting! It's fixed now in r5727.

There was a change - the isdigit is used in a new function I added to strings (eraseTrailingFloatZeros). And Irrlicht is not using isdigit from cctype as it doesn't want that dependency (I also didn't know...). It even undef's them (which I'm pretty sure is a bad idea - why ever undef a standard function, that only leads to troubles...).
It likely compiled on VS (and on Linux as well I think) because the cctype is then included again in some other header.
edit: I also kicked out those #undef's now.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply