我正在用 C++ 发送一封简单的电子邮件。我从以下链接下载了一个示例 C++ 程序。http://cboard.cprogramming.com/cplusplus-programming/125655-sending-simple-email-cplusplus.html 示例程序在编译时似乎遇到了以下错误。请帮我解决。
Error 8 error LNK2019: unresolved external symbol _send_mail referenced in function _wmain
Error 9 error LNK2019: unresolved external symbol __imp__recv@16 referenced in function "int __cdecl connect_to_server(char const *)" (?connect_to_server@@YAHPBD@Z)
Error 10 error LNK2019: unresolved external symbol __imp__connect@12 referenced in function "int __cdecl connect_to_server(char const *)" (?connect_to_server@@YAHPBD@Z)
Error 11 error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "int __cdecl connect_to_server(char const *)" (?connect_to_server@@YAHPBD@Z)
Error 12 error LNK2019: unresolved external symbol __imp__socket@12 referenced in function "int __cdecl connect_to_server(char const *)" (?connect_to_server@@YAHPBD@Z)
Error 13 error LNK2019: unresolved external symbol __imp__getprotobyname@4 referenced in function "int __cdecl connect_to_server(char const *)" (?connect_to_server@@YAHPBD@Z)
Error 14 error LNK2019: unresolved external symbol __imp__gethostbyname@4 referenced in function "int __cdecl connect_to_server(char const *)" (?connect_to_server@@YAHPBD@Z)