[hxcpp] fatal error: sys/socket.h: No such file or directory

1,840 views
Skip to first unread message

Seb T

unread,
Jul 24, 2016, 5:26:59 PM7/24/16
to Haxe
Hey guys,
I created an application based on OpenFL and HaxeUI. It compiles fine with hxcpp (3,3,49) and haxe (3.2.1).

However when trying to compile with haxe 3.3.0-rc1 I get the following error.

- Compiling group 'haxe' with flags -Iinclude -c -O2 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_CHECK_POINTER(haxe) -DHXCPP_STACK_TRACE(haxe) -DHXCPP_STACK_LINE(haxe) -DHXCPP_API_LEVEL=330(haxe) -DHX_WINDOWS -m32 -IC:/apps/dev/haxe/haxe-3.3.0-rc1/lib/hxcpp/3,3,49/include tags=[haxe,static]
 
- Compile : src/sys/ssl/_Socket/SocketOutput.cpp
 
- Compile : src/sys/ssl/_Socket/SocketInput.cpp
 
- Compile : src/sys/ssl/Socket.cpp
 
- Compile : src/sys/ssl/Certificate.cpp
 
- Compile : src/sys/ssl/Key.cpp
 
- Compile : src/sys/net/Socket.cpp
 
- Compile : src/sys/net/_Socket/SocketOutput.cpp
 
- Compile : src/sys/net/_Socket/SocketInput.cpp
 
- Compile : src/sys/net/Host.cpp
 
- Compile : src/sys/io/FileOutput.cpp
 
- Compile : src/sys/io/File.cpp
 
- Compile : src/sys/FileSystem.cpp
 
- Compile : src/haxe/lang/Iterable.cpp
...
 
- Compiling group 'hxcpp_ssl' with flags -IC:/apps/dev/haxe/haxe-3.3.0-rc1/lib/hxcpp/3,3,49/project/thirdparty/mbedtls-2.2.1/include -c -O2 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_CHECK_POINTER(haxe) -DHXCPP_STACK_TRACE(haxe) -DHXCPP_STACK_LINE(haxe) -DHXCPP_API_LEVEL=330(haxe) -DHX_WINDOWS -m32 -IC:/apps/dev/haxe/haxe-3.3.0-rc1/lib/hxcpp/3,3,49/include tags=[haxe,static]
 
- Compile : C:/apps/dev/haxe/haxe-3.3.0-rc1/lib/hxcpp/3,3,49/project/thirdparty/mbedtls-2.2.1/library/ssl_srv.c
 
- Compile : C:/apps/dev/haxe/haxe-3.3.0-rc1/lib/hxcpp/3,3,49/src/hx/libs/ssl/SSL.cpp
 
- Compile : C:/apps/dev/haxe/haxe-3.3.0-rc1/lib/hxcpp/3,3,49/project/thirdparty/mbedtls-2.2.1/library/sha512.c
Error: While running :g++.exe -IC:/apps/dev/haxe/haxe-3.3.0-rc1/lib/hxcpp/3,3,49/project/thirdparty/mbedtls-2.2.1/include -c -O2 -DHXCPP_VISIT_ALLOCS -DHXCPP_CHECK_POINTER -DHXCPP_STACK_TRACE -DHXCPP_STACK_LINE -DHXCPP_API_LEVEL=330 -DHX_WINDOWS -m32 -IC:/apps/dev/haxe/haxe-3.3.0-rc1/lib/hxcpp/3,3,49/include -x c++ -frtti C:/apps/dev/haxe/haxe-3.3.0-rc1/lib/hxcpp/3,3,49/src/hx/libs/ssl/SSL.cpp -oD:/haxe-projects/vegardit-bpm_counter/target/windows/cpp/obj/obj/mingw-nc/8761f3d4_SSL.o
C
:/apps/dev/haxe/haxe-3.3.0-rc1/lib/hxcpp/3,3,49/src/hx/libs/ssl/SSL.cpp:7:27: fatal error: sys/socket.h: No such file or directory
compilation terminated
.



Any ideas?

Hugh

unread,
Jul 25, 2016, 12:35:11 AM7/25/16
to Haxe
Looks like the SSL code was expecting MSC_VER on windows, so it did not work for mingw.
I have make a small fix to the hxcpp git repo.

Hugh

Seb T

unread,
Jul 25, 2016, 5:59:43 AM7/25/16
to Haxe
Works like a charm. Thanks Hugh!!!
Reply all
Reply to author
Forward
0 new messages