Hello,

I have made a "server" using winsocket. Its a console application and I already added wsock32.lib to liker.

Here is error I get (by linker)

1>Linking...
1>server.obj : error LNK2019: unresolved external symbol __imp__mciSendStringA@16 referenced in function _main
1>server.obj : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function _main
1>server.obj : error LNK2019: unresolved external symbol _recv@16 referenced in function _main
1>server.obj : error LNK2019: unresolved external symbol _accept@12 referenced in function _main
1>server.obj : error LNK2019: unresolved external symbol _listen@8 referenced in function _main
1>server.obj : error LNK2019: unresolved external symbol _bind@12 referenced in function _main
1>server.obj : error LNK2019: unresolved external symbol _htons@4 referenced in function _main
1>server.obj : error LNK2019: unresolved external symbol _socket@12 referenced in function _main
1>server.obj : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function _main
1>C:\Users\jan\Documents\Visual Studio 2005\Projects\YAST server console\Debug\YAST server console.exe : fatal error LNK1120: 9 unresolved externals
1>Build log was saved at "file://c:\Users\jan\Documents\Visual Studio 2005\Projects\YAST server console\YAST server console\Debug\BuildLog.htm"
1>YAST server console - 10 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Hope you can help me

Recommended Answers

include winsock2.h
link to ws2_32.lib
needs ws2_32.dll

Jump to Post

for mciSendString, link to winmm.lib

Jump to Post

All 5 Replies

include winsock2.h
link to ws2_32.lib
needs ws2_32.dll

Okie dokie..Thanks man

Now I get only this error:

1>server.obj : error LNK2001: unresolved external symbol __imp__mciSendStringA@16

for mciSendString, link to winmm.lib

oh winmm.lib was needed

hey vijayan121 you were faster than me !

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.