HaxeFoundation / HaxeFoundation/hxcpp

Sys.cpp:174:34: error: cannot initialize a parameter of type 'const char *' with an rvalue of type 'const wchar_t *'

Open
#883 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
330
Forks
227
Avg merge
2d 16h
Merged PRs (30d)
18

Description

build with emcc

-D emscripten

got this error.

haxe:4.0.5

hxcpp:git

--------------------------------------------

Error: shared:WARNING: ignoring -fPIC flag when not building with SIDE_MODULE or MAIN_MODULE
/root/haxe/haxelib/hxcpp/git/src/hx/libs/std/Sys.cpp:174:14: error: use of undeclared identifier '_wsetlocale'; did you mean 'setlocale'?
return _wsetlocale(LC_TIME,l.wchar_str());
^~~~~~~~~~~
setlocale
/root/test/emsdk/upstream/emscripten/system/include/libc/locale.h:53:7: note: 'setlocale' declared here
char *setlocale (int, const char *);
^
/root/haxe/haxelib/hxcpp/git/src/hx/libs/std/Sys.cpp:174:34: error: cannot initialize a parameter of type 'const char *' with an rvalue of type 'const wchar_t *'
return _wsetlocale(LC_TIME,l.wchar_str());
^~~~~~~~~~~~~
/root/test/emsdk/upstream/emscripten/system/include/libc/locale.h:53:35: note: passing argument to parameter here
char *setlocale (int, const char *);
^
2 errors generated.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.