haxe icon indicating copy to clipboard operation
haxe copied to clipboard

Cannot compile simple cpp target

Open Sod-Almighty opened this issue 3 years ago • 0 comments

# haxe -main Hello -cpp .
haxelib run hxcpp Build.xml haxe -Dhaxe3="1" -Dhaxe_ver="3.201" -Dhxcpp_api_level="321" -I"/usr/lib/haxe/extraLibs/" -I"/usr/local/lib/haxe/extraLibs/" -I"" -I"/usr/lib/haxe/std/cpp/_std/" -I"/usr/share/haxe/std/cpp/_std/" -I"/usr/local/lib/haxe/std/cpp/_std/" -I"/usr/lib/haxe/std/" -I"/usr/share/haxe/std/" -I"/usr/local/lib/haxe/std/"
Creating /tmp/obj/linux64/__pch/haxe/hxcpp.h.gch...

Compiling group: haxe
g++ -Iinclude -c -fvisibility=hidden -O2 -fpic -fPIC -Wno-overflow -DHX_LINUX -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=321(haxe) -m64 -DHXCPP_M64 -I/usr/share/haxelib/hxcpp/4,2,1/include ... tags=[haxe,static]
 - src/__boot__.cpp
 - src/Hello.cpp
 - src/Std.cpp
 - src/__files__.cpp
 - src/haxe/Log.cpp
 - src/__resources__.cpp

Compiling group: __main__
g++ -Iinclude -DHX_DECLARE_MAIN -c -fvisibility=hidden -O2 -fpic -fPIC -Wno-overflow -DHX_LINUX -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=321(haxe) -m64 -DHXCPP_M64 -I/usr/share/haxelib/hxcpp/4,2,1/include ... tags=[haxe,main,static]
 - src/__main__.cpp
Creating /tmp/obj/linux64/__pch/runtime/hxcpp.h.gch...

Compiling group: runtime
g++ -D_CRT_SECURE_NO_DEPRECATE -DHX_UNDEFINE_H -c -fvisibility=hidden -O2 -fpic -fPIC -Wno-overflow -DHX_LINUX -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=321(haxe) -m64 -DHXCPP_M64 -I/usr/share/haxelib/hxcpp/4,2,1/include ... tags=[haxe]
 - src/hx/Interface.cpp
 - src/Array.cpp
 - src/hx/Boot.cpp
 - src/hx/Date.cpp
Error: /usr/share/haxelib/hxcpp/4,2,1/src/Array.cpp: In member function ‘virtual Dynamic hx::ArrayBase_contains::__Run(const Array<Dynamic>&)’:
/usr/share/haxelib/hxcpp/4,2,1/src/Array.cpp:580:18: error: ‘class hx::ArrayBase’ has no member named ‘__contains’; did you mean ‘__ToString’?
       ret mThis->__##func(array_list); return Dynamic(); \
                  ^
/usr/share/haxelib/hxcpp/4,2,1/src/Array.cpp:596:38: note: in expansion of macro ‘DEFINE_ARRAY_FUNC’
 #define DEFINE_ARRAY_FUNC1(ret,func) DEFINE_ARRAY_FUNC(ret,func,HX_ARR_LIST1,HX_DYNAMIC_ARG_LIST1,HX_ARG_LIST1,1)
                                      ^~~~~~~~~~~~~~~~~
/usr/share/haxelib/hxcpp/4,2,1/src/Array.cpp:631:1: note: in expansion of macro ‘DEFINE_ARRAY_FUNC1’
 DEFINE_ARRAY_FUNC1(return,contains);
 ^~~~~~~~~~~~~~~~~~
/usr/share/haxelib/hxcpp/4,2,1/src/Array.cpp: In member function ‘virtual Dynamic hx::ArrayBase_contains::__run(const Dynamic&)’:
/usr/share/haxelib/hxcpp/4,2,1/src/Array.cpp:584:18: error: ‘class hx::ArrayBase’ has no member named ‘__contains’; did you mean ‘__ToString’?
       ret mThis->__##func(arg_list); return Dynamic(); \
                  ^
/usr/share/haxelib/hxcpp/4,2,1/src/Array.cpp:596:38: note: in expansion of macro ‘DEFINE_ARRAY_FUNC’
 #define DEFINE_ARRAY_FUNC1(ret,func) DEFINE_ARRAY_FUNC(ret,func,HX_ARR_LIST1,HX_DYNAMIC_ARG_LIST1,HX_ARG_LIST1,1)
                                      ^~~~~~~~~~~~~~~~~
/usr/share/haxelib/hxcpp/4,2,1/src/Array.cpp:631:1: note: in expansion of macro ‘DEFINE_ARRAY_FUNC1’
 DEFINE_ARRAY_FUNC1(return,contains);
 ^~~~~~~~~~~~~~~~~~
/usr/share/haxelib/hxcpp/4,2,1/src/Array.cpp: In function ‘bool hx::DynamicEq(const Dynamic&, const Dynamic&)’:
/usr/share/haxelib/hxcpp/4,2,1/src/Array.cpp:744:11: error: ‘IsEq’ is not a member of ‘hx’
    return hx::IsEq(a,b);
           ^~
Error: Build failed

# cat Hello.hx

class Hello {
    static public function main():Void {
        // Single line comment
        trace("Hello");
    }
}

# uname -a Linux nas 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64 GNU/Linux

# cat /etc/issue Debian GNU/Linux 9 \n \l

Sod-Almighty avatar Aug 26 '22 13:08 Sod-Almighty