Nonmally I program in perl, but now decided to write some network programs in c++. But im having some problems getting started to say the least. I have Borland C++ 5.5.1 for Win32 for console applications and I want to use wininet.h. Like so(I've stripped everything,it just needs to compile):
using namespace std;
HINTERNET connect = InternetOpen("brow",INTERNET_OPEN_TYPE_PRECONFIG,NULL, NULL, 0);
I found a number of examples on the internet and this should be ok. But this is the error i get
Error: Unresolved external 'InternetOpenA' referenced from C:\BORLAND\MYSOURCE\I
Can someone confirm to me that this indeed compiles, and explain what is the exact problem here? Thank you in advance
In MS Visual Studio you can add #pragma comment(lib, "wininet.lib") to your code file and then the linker would pick it up correctly. I don't know how to specify additional LIB's in Borland's software.