HaxeFoundation / HaxeFoundation/hxcpp

Compilation fails in Sys.cpp on mingw/windows

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

Description

On Win 10, after installing the haxelib `minimingw` I'm setting the environment variable `toolchain=mingw` and try to compile a project with:

```
> haxe -cpp bin/cpp -D HXCPP_VERBOSE -lib travix -lib dataclass tests.hxml
```

tests.hxml:

```
-lib buddy
-lib deepstate
-cp ./tests/
-cp ./src/
-main Tests2
```

But it eventually fails with:

```
haxelib run hxcpp Build.xml haxe -DHXCPP_VERBOSE="1" -Dasynctools="0.1.0" -Dbuddy="2.10.0" -Dbuddy-colors="1" -Dbuddy_colors="1" -Ddataclass="1.5.1" -Ddataclass-date-auto-conversion="1" -Ddataclass_date_auto_conversion="1" -Ddeepstate="0.13.2" -Dhaxe3="1" -Dhaxe4="1" -Dhaxe_ver="4.000" -Dhxcpp_api_level="400" -Dpromhx="1.1.0" -Dpure="1" -Dsource-header="Generated by Haxe 4.0.0-rc.2+77068e10c" -Dstatic="1" -Dtarget.name="cpp" -Dtarget.static="true" -Dtarget.sys="true" -Dtarget.threaded="true" -Dtarget.utf16="true" -Dtink_chunk="0.2.0" -Dtink_cli="0.4.1" -Dtink_core="1.21.0" -Dtink_io="0.6.2" -Dtink_macro="0.17.4" -Dtink_streams="0.3.2" -Dtink_stringly="0.3.1" -Dtravix="0.12.2" -Duse-rtti-doc="1" -Duse_rtti_doc="1" -Dutf16="1" -I"./src/" -I"./tests/" -I"E:\\Projects\\Haxe\\deepstate\\src\\" -I"e:\\Program\\HaxeToolkit\\haxe\\lib\\promhx/1,1,0/src/main/" -I"E:\\Projects\\Haxe\\asynctools\\src\\" -I"e:\\Projects\\Haxe\\buddy\\src\\" -I"e:\\Projects\\Haxe\\dataclass\\src\\" -I"e:\\Program\\HaxeToolkit\\haxe\\lib\\tink_stringly/0,3,1/src/" -I"e:\\Program\\HaxeToolkit\\haxe\\lib\\tink_macro/0,17,4/src/" -I"e:\\Program\\HaxeToolkit\\haxe\\lib\\tink_core/1,21,0/src/" -I"e:\\Program\\HaxeToolkit\\haxe\\lib\\tink_streams/0,3,2/src/" -I"e:\\Program\\HaxeToolkit\\haxe\\lib\\tink_chunk/0,2,0/src/" -I"e:\\Program\\HaxeToolkit\\haxe\\lib\\tink_io/0,6,2/src/" -I"e:\\Program\\HaxeToolkit\\haxe\\lib\\tink_cli/0,4,1/src/" -I"E:\\Projects\\Haxe\\travix\\src\\" -I"E:\\Program\\HaxeToolkit\\haxe\\extraLibs/" -I"" -I"E:\\Program\\HaxeToolkit\\haxe\\std/cpp/_std/" -I"E:\\Program\\HaxeToolkit\\haxe\\std/"
__
/\ \
\ \ \___ __ _ ___ _____ _____
\ \ _ `\ /\ \/'\ /'___\/\ '__`\/\ '__`\
\ \ \ \ \\/> _hx_std_sys_env()':
e:/Program/HaxeToolkit/haxe/lib/hxcpp/4,0,8/src/hx/libs/std/Sys.cpp:722:15: error: 'environ' was not declared in this scope
char **e = environ;
^
Error: Build failed
```

Since the errors happen in Sys.cpp, I'm at a loss here. Let me know if you need anything else!

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.