WinInt.h, ftp, błędy linkera.

0

Witam.
Mam problem z biblioteką WinInt.h.

#include <windows.h>
#include <WinInet.h>
#include <iostream>

using namespace std;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
                   LPSTR lpszCmdLine,   int nCmdShow)
{
	HINTERNET hint;
	HINTERNET ftp;
	hint=InternetOpen("asd",INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0);
        ftp=InternetConnect(hint, "127.0.0.1" INTERNET_DEFAULT_FTP_PORT, "666", "666", INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 101);
	FtpGetFile(ftp,"dupa.txt","c:\\dupa.txt",true, FILE_ATTRIBUTE_NORMAL, INTERNET_FLAG_TRANSFER_BINARY,0);
        InternetCloseHandle(ftp);
        InternetCloseHandle(hint);
	MessageBox (NULL, "dupa", "Komunikat", NULL);
        return 0;
} 

linker wywala mi:

1>Linking...
1>ftp3.obj : error LNK2019: unresolved external symbol __imp__InternetCloseHandle@4 referenced in function _WinMain@16
1>ftp3.obj : error LNK2019: unresolved external symbol __imp__FtpGetFileA@28 referenced in function _WinMain@16
1>ftp3.obj : error LNK2019: unresolved external symbol __imp__InternetConnectA@32 referenced in function _WinMain@16
1>ftp3.obj : error LNK2019: unresolved ext<ort> </ort>ernal symbol __imp__InternetOpenA@20 referenced in function _WinMain@16
1>C:\Users\set\Desktop\MyProjects\ftp3\Debug\ftp3.exe : fatal error LNK1120: 4 unresolved externals 

Z tego co udało mi się wyszukać z błędów wrzuconych na google chodzi o entry point, rzekomo linker szuka wejścia na _tmain. Rozwiązania nie mogę znaleźć.
Korzystam z visual c++ 2008, project - windows application, ustawiony na mbcs.
Pomocy.

0

Strzeliłem parę byków, chodzi oczywiście o WinInet,h.
Problem rozwiązałem. Dodałem WinInet.lib do linkera i poszło.
Przepraszam za śmietnik.

1 użytkowników online, w tym zalogowanych: 0, gości: 1