1

I am trying to build c-ares library for Win CE as a part of porting node js to windows CE.

I have run into some blockers in the process.

While compiling ares_platform.c file I get the error:

Error   158 error C2065: 'OSVERSIONINFOEX' : undeclared identifier  C:\Users\syedalim\Desktop\cares\src\ares_platform.c 39  1   cares

OSVERSIONINFOEX is included as a part of header files. Still getting this error.

I understand that some of the APIs may not be supported for Windows CE, but we are planning to implement our custom code if the native cares library can't be ported to CE.

So I commented out the lines Where it checks for OSVERSIONINFOEX and then I get,

Error   150 error LNK1181: cannot open input file 'ws2_32.lib'  C:\Users\syedalim\Desktop\cares\LINK    cares

Does c-ares need some depedencies? What does this ws2_32 lib mean?

Has some one compiled cares library for Win CE ? If some ppl can point me to correct resources, that would be great. Thanks in advance.

Shaik Syed Ali
  • 3,359
  • 3
  • 17
  • 22

1 Answers1

2

ws2_32.lib is the (desktop) Windows sockets implementation used for network communication.

On Windows CE this library is called ws2.lib, so you'll need to update the linker reference in your project.

Carsten Hansen
  • 1,508
  • 2
  • 21
  • 27
  • Thanks. Fixed the Problem. But other linker errors are showing up. Probably they are all 32 bit APIs which may not be supported by CE. For ex : Error 258 error LNK2001: unresolved external symbol getenv C:\Users\syedalim\Desktop\cares\ares_search.obj cares – Shaik Syed Ali Sep 19 '16 at 10:19
  • Windows CE has no `getenv` equivalent, so you would have to implement or work around that yourself – Carsten Hansen Sep 19 '16 at 10:28