Bug #47157 Client library in Cluster package fails link test
Submitted: 6 Sep 2009 11:51 Modified: 25 Oct 2018 6:39
Reporter: Kent Boortz Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S3 (Non-critical)
Version:7.0.7 OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[6 Sep 2009 11:51] Kent Boortz
Description:
A link test with a sample application (that references all client API functions)
fails on Windows. The C and C++ link test against "mysqlclient.lib" fails with

mysqlclient.lib(client.obj) : error LNK2019: unresolved external symbol __imp__freeaddrinfo@4 referenced in function _mysql_real_connect@32
mysqlclient.lib(client.obj) : error LNK2019: unresolved external symbol __imp__getaddrinfo@16 referenced in function _mysql_real_connect@32
mysqlclient.lib(viosocket.obj) : error LNK2019: unresolved external symbol __imp__getnameinfo@28 referenced in function _vio_getnameinfo

The link test against "mysqlserver.lib" fails with too many unresolved
references to list here.

How to repeat:
cl -o out-cc /MT  -Iinclude -D_WINDOWS  test.c /link lib/opt/mysqlclient.lib wsock32.lib advapi32.lib /nologo /subsystem:console

cl -o out-cxx /MT  -Iinclude -D_WINDOWS  test.cc /link lib/opt/mysqlserver.lib user32.lib wsock32.lib advapi32.lib /nologo /subsystem:console

The test program is attached
[6 Sep 2009 11:52] Kent Boortz
Test program for linking only, doesn't run

Attachment: test.c (application/octet-stream, text), 8.62 KiB.

[7 Sep 2009 11:20] Frazer Clement
IPv6 related changes require that clients are linked to the ws2_32 library.
[12 Sep 2009 17:57] Vladislav Vaintroub
Also, wsock32.lib in linker line is bogus