Build error with latest checkin on Windows

The checkin is this:

The build error comes from this line:

The build error is: error C2664: ‘INT InetPtonW(INT,PCWSTR,PVOID)’: cannot convert argument 2 from ‘const char *’ to ‘PCWSTR’

The fix is: return InetPtonA(family, addr_str, addr_buf);

The reason is the project default is to use wchar_t, which Windows.h will point to InetPtonW (wchar_t version). InetPtonA points to the char* version of the API.

1 Like

@jmorrill can you send a PR to fix the problem?

Thanks @jmorrill point the issue, I am very sorry for introducing this issue, the reason is I don’t have Windows so that I don’t test on Windows. Wish we could avoid this things when we restore windows / mac build. I would like to see you could send PR to fix it. If you couldn’t do, I would like to handle it.(Let me find one Windows machine firstly…) Sorry again for this. :frowning:

@tqchen could we restore windows / mac build support like we did in dmlc / tvm? I find we lack it when we move to apache, only have CI.

The apache infra is still looking into restore azure pipeline support, I will report back once it is online.

2 Likes

No worries. This was simple! I only found out because I wanted to try out your new RPC server and see what it would take to get it working in Windows. I’m having a rough time with Python, so was happy to see more C++ :slight_smile:

I can do a PR, but I maybe a bit busy tonight if you’re looking for a quick turn-around.

2 Likes

@jmorrill it would be great if you can help to send in a PR :slight_smile:

I think this is my first PR…ever.

cc: @frozengene

2 Likes