HaxeFoundation / HaxeFoundation/hxcpp
use of undeclared identifier '_wsetlocale'; with HX_SMART_STRINGS
- Dominant language
- C++
- Stars
- 330
- Forks
- 227
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 18
Description
I try to compile a wasm via `lime test emscripten -webassembly` but I get this error following.
How can i fix it and compile it?
```
Compiling group: hxcpp_std
emcc -c -fvisibility=hidden -O1 -fpic -fPIC -DEMSCRIPTEN -Wno-overflow -Wno-parentheses -Wno-unknown-warning-option -Wno-null-dereference -Wno-unused-value -Wno-format-extra-args -Wno-bool-conversion -Wno-warn-absolute-paths -DSTATIC_LINK(static) -DHXCPP_VISIT_ALLOCS(haxe) -DHX_SMART_STRINGS(haxe) -DHXCPP_API_LEVEL=400(haxe) -I/home/josef/haxelib/hxcpp/4,0,64/include ... tags=[haxe,static]
- Sys.cpp
Error: /home/josef/haxelib/hxcpp/4,0,64/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
/home/josef/Dokumente/git/emsdk/upstream/emscripten/system/include/libc/locale.h:53:7: note: 'setlocale' declared here
char *setlocale (int, const char *);
^
/home/josef/haxelib/hxcpp/4,0,64/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());
^~~~~~~~~~~~~
/home/josef/Dokumente/git/emsdk/upstream/emscripten/system/include/libc/locale.h:53:35: note: passing argument to parameter here
char *setlocale (int, const char *);
^
2 errors generated.
shared:ERROR: '/home/josef/Dokumente/git/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=3 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/home/josef/Dokumente/git/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/home/josef/Dokumente/git/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/home/josef/Dokumente/git/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/home/josef/Dokumente/git/emsdk/upstream/emscripten/system/include -Xclang -isystem/home/josef/Dokumente/git/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/home/josef/Dokumente/git/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/home/josef/Dokumente/git/emsdk/upstream/emscripten/system/local/include -c -fvisibility=hidden -O1 -fpic -fPIC -DEMSCRIPTEN -Wno-overflow -Wno-parentheses -Wno-unknown-warning-option -Wno-null-dereference -Wno-unused-value -Wno-format-extra-args -Wno-bool-conversion -DSTATIC_LINK -DHXCPP_VISIT_ALLOCS -DHX_SMART_STRINGS -DHXCPP_API_LEVEL=400 -I/home/josef/haxelib/hxcpp/4,0,64/include -x c++ -frtti --std=c++11 -Wno-invalid-offsetof -Wno-return-type-c-linkage -DEMSCRIPTEN /home/josef/haxelib/hxcpp/4,0,64/src/hx/libs/std/Sys.cpp -Xclang -isystem/home/josef/Dokumente/git/emsdk/upstream/emscripten/system/include/SDL -c -o /home/josef/Dokumente/git/FlixelTut/export/emscripten/obj/obj/emscripten-stat/63226c86_Sys.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (1)
```
EDIT:
I'm unsing Ubuntu 18.04 - all software up to date.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.