Я запускаю 64-разрядную версию Win 7 и использую VS 2010 c++ Express. Я пытаюсь узнать, как создать приложение win32, которое может подключаться к веб-сайту.
Когда я создаю приложение, я получаю следующее сообщение об ошибке:
1> Generating Code...
1>PWP.obj : error LNK2019: unresolved external symbol
__imp__recv@16 referenced in function "int __cdecl PWP(struct HWND__ *,char *)" (?PrintWebPage@@YAHPAUHWND__@@PAD@Z)
1>PWP.obj : error LNK2019: .. __imp__send@16 referenced in function "int __cdecl PrintWebPage(struct HWND__ *,char *)" (?PrintWebPage@@YAHPAUHWND__@@PAD@Z)
1>PWP.obj : error LNK2019: .. __imp__closesocket@4 referenced in function "int __cdecl PrintWebPage(struct HWND__ *,char *)" (?PrintWebPage@@YAHPAUHWND__@@PAD@Z)
1>PWP.obj : error LNK2019: .. __imp__connect@12 referenced in function "int __cdecl PrintWebPage(struct HWND__ *,char *)" (?PrintWebPage@@YAHPAUHWND__@@PAD@Z)
1>PWP.obj : error LNK2019: .. __imp__htons@4 referenced in function "int __cdecl PrintWebPage(struct HWND__ *,char *)" (?PrintWebPage@@YAHPAUHWND__@@PAD@Z)
1>PWP.obj : error LNK2019: .. __imp__inet_addr@4 referenced in function "int __cdecl PrintWebPage(struct HWND__ *,char *)" (?PrintWebPage@@YAHPAUHWND__@@PAD@Z)
1>PWP.obj : error LNK2019: .. __imp__WSACleanup@0 referenced in function "int __cdecl PrintWebPage(struct HWND__ *,char *)" (?PrintWebPage@@YAHPAUHWND__@@PAD@Z)
1>PWP.obj : error LNK2019: .. __imp__WSAGetLastError@0 referenced in function "int __cdecl PrintWebPage(struct HWND__ *,char *)" (?PrintWebPage@@YAHPAUHWND__@@PAD@Z)
1>PWP.obj : error LNK2019: .. __imp__socket@12 referenced in function "int __cdecl PrintWebPage(struct HWND__ *,char *)" (?PrintWebPage@@YAHPAUHWND__@@PAD@Z)
1>PWP.obj : error LNK2019: .. __imp__WSAStartup@8 referenced in function "int __cdecl PrintWebPage(struct HWND__ *,char *)" (?PrintWebPage@@YAHPAUHWND__@@PAD@Z)
1>PWP.obj : error LNK2019: .. __imp__WSASetLastError@4 referenced in function _WspiapiGetAddrInfo@16
1>PWP.obj : error LNK2019: .. __imp__inet_ntoa@4 referenced in function _WspiapiLegacyGetAddrInfo@16
1>PWP.obj : error LNK2019: .. __imp__htonl@4 referenced in function _WspiapiLegacyGetAddrInfo@16
1>PWP.obj : error LNK2019: .. __imp__getservbyname@8 referenced in function _WspiapiLegacyGetAddrInfo@16
1>PWP.obj : error LNK2019: .. __imp__gethostbyname@4 referenced in function _WspiapiQueryDNS@24
1>PWP.obj : error LNK2019: .. __imp__gethostbyaddr@12 referenced in function _WspiapiLegacyGetNameInfo@28
1>PWP.obj : error LNK2019: .. __imp__getservbyport@8 referenced in function _WspiapiLegacyGetNameInfo@28
1>PWP.obj : error LNK2019: .. __imp__ntohs@4 referenced in function _WspiapiLegacyGetNameInfo@28
1>C:\Users\Robert\Documents\Rob\Apps4win\WebsiteComm\Debug\WebsiteComm.exe : fatal
Поддерживает ли VS 2010 c++ Express эти функции?
Если да, то как мне получить мой проект, чтобы найти и связать с ними?
Я считаю, что это подходящие вопросы для этого форума.
Если нет, прошу прощения.
Вам нужно будет связать wsock32.lib
в вашем проекте.