Closed ghoomfrog closed 3 years ago
Hello. What compiler are you using? What version? It seems that additional include is needed.
gcc 10.2.0
Currently I'm using previous version of gcc, so I cannot reproduce this error. But it seems like mac and ios have the same issue. Please try adding PLATFORM_LINUX define to line 185 int utPlatform.h and see if it works.
// Locale independent version of atof (taking always dot as decimal separator)
#if defined( PLATFORM_MAC ) || defined ( PLATFORM_IOS ) || defined ( PLATFORM_LINUX )
#include <xlocale.h>
#endif
I've done it, but:
In file included from /home/u/rep/Horde3D-2.0.0/Extensions/Overlays/Source/extension.cpp:13:
/home/u/rep/Horde3D-2.0.0/Horde3D/Source/Shared/utPlatform.h:186:11: fatal error: xlocale.h: No such file or directory
186 | #include <xlocale.h>
| ^~~~~~~~~~~
compilation terminated.
make[2]: *** [Extensions/Overlays/Source/CMakeFiles/Horde3DOverlays.dir/build.make:76: Extensions/Overlays/Source/CMakeFiles/Horde3DOverlays.dir/extension.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:543: Extensions/Overlays/Source/CMakeFiles/Horde3DOverlays.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
It seems that gcc removed this file from libc and judging by https://bugs.freedesktop.org/show_bug.cgi?id=102454 it should be moved to stdlib.h. Could you please try the following:
// Locale independent version of atof (taking always dot as decimal separator)
#if defined( PLATFORM_MAC ) || defined ( PLATFORM_IOS )
#include <xlocale.h>
#elif defined( PLATFORM_LINUX )
#include <cstdlib>
#endif
If it doesn't work, you may have to add #define __USE_GNU
before including cstdlib.
Sorry for nagging you with different proposals :)
That worked! make
has been successful. And I didn't need to add #define __USE_GNU
.
And don't be sorry for helping out :).
i use arch btw