Hi all,
I compiled ahost.c to test Ares in Wince. But many errors! Here is what I did.
1.add a new WCE Pocket PC 2003 project in my workspace, named ares_test, which is dependent on ares lib project.
2.add source file ahost.c to ares_test.
3.use Pocket PC 2003 Emulator
4.debug ares_test.exe, and these are the errors:
Linking...
ahost.obj : error LNK2019: unresolved external symbol __imp__select referenced in function _main
ahost.obj : error LNK2019: unresolved external symbol __imp__inet_addr referenced in function _main
ares_ppc.lib(ares_gethostbyname.obj) : error LNK2001: unresolved external symbol __imp__inet_addr
ares_ppc.lib(ares_init.obj) : error LNK2001: unresolved external symbol __imp__inet_addr
ares_ppc.lib(ares__get_hostent.obj) : error LNK2019:
unresolved external symbol __imp__inet_addr referenced in function _ares__get_hostent
ahost.obj : error LNK2019: unresolved external symbol __imp__inet_ntoa referenced in function _callback
corelibc.lib(pegwmain.obj) : error LNK2019: unresolved external symbol _WinMain referenced in function _WinMainCRTStartup
ares_ppc.lib(ares_process.obj) : error LNK2019: unresolved external symbol _time referenced in function _ares_process
ares_ppc.lib(ares_timeout.obj) : error LNK2001: unresolved external symbol _time
ares_ppc.lib(ares_send.obj) : error LNK2019: unresolved external symbol _time referenced in function _ares_send
ares_ppc.lib(ares_process.obj) : error LNK2019: unresolved external symbol __write referenced in function _write_tcp_data
ares_ppc.lib(ares_process.obj) : error LNK2019: unresolved external symbol __imp__WSASend referenced in function _write_tcp_data
ares_ppc.lib(ares_process.obj) : error LNK2019: unresolved external symbol ___WSAFDIsSet referenced
in function _write_tcp_data
ares_ppc.lib(ares_process.obj) : error LNK2019: unresolved external symbol __read referenced in function _read_tcp_data
ares_ppc.lib(ares_process.obj) : error LNK2019: unresolved external symbol __imp__WSAGetLastError referenced in function _read_udp_packets
ares_ppc.lib(ares_process.obj) : error LNK2019: unresolved external symbol __imp__recv referenced in function _read_udp_packets
ares_ppc.lib(ares_process.obj) : error LNK2019: unresolved external symbol __imp__send referenced in function _ares__send_query
ares_ppc.lib(ares_process.obj) : error LNK2001: unresolved external symbol _errno
ares_ppc.lib(ares_init.obj) : error LNK2001: unresolved external symbol _errno
ares_ppc.lib(ares_process.obj) : error LNK2019: unresolved external symbol __imp__connect referenced in function _open_tcp_socket
ares_ppc.lib(ares_process.obj) : error LNK2019: unresolved external symbol __imp__ioctlsocket referenced in function
_open_tcp_socket
ares_ppc.lib(ares_process.obj) : error LNK2019: unresolved external symbol __imp__socket referenced in function _open_tcp_socket
ares_ppc.lib(ares_process.obj) : error LNK2019: unresolved external symbol __imp__closesocket referenced in function _ares__kill_socket
ares_ppc.lib(ares_gethostbyaddr.obj) : error LNK2019: unresolved external symbol __imp__ntohl referenced in function _next_lookup
ares_ppc.lib(ares_init.obj) : error LNK2019: unresolved external symbol __imp__ntohl referenced in function _ares_init_options
ares_ppc.lib(ares_init.obj) : error LNK2019: unresolved external symbol __imp__gethostname referenced in function _init_by_defaults
ares_ppc.lib(ares_init.obj) : error LNK2019: unresolved external symbol __imp__htonl referenced in function _init_by_defaults
ares_ppc.lib(ares_init.obj) : error LNK2019: unresolved external symbol _LoadLibraryA referenced in function _init_by_defaults
ares_ppc.lib(ares_init.obj) : error LNK2019:
unresolved external symbol __imp__htons referenced in function _init_by_defaults
emulatorDbg/ares_test.exe : fatal error LNK1120: 22 unresolved externals
Error executing link.exe.
I don't quite understand those errors. How can I fix them? Thanks for help!!