| tenny1204 (2) | |
|
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): #include<windows.h> #include<wininet.h> using namespace std; int main(){ HINTERNET connect = InternetOpen("brow",INTERNET_OPEN_TYPE_PRECONFIG,NULL, NULL, 0); return 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 N.OBJ Can someone confirm to me that this indeed compiles, and explain what is the exact problem here? Thank you in advance | |
|
|
|
| webJose (2947) | |
|
You're missing the LIB. See http://msdn.microsoft.com/en-us/library/windows/desktop/aa385096(v=vs.85).aspx for the LIB's name (near the bottom of the page): wininet.lib. 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.
| |
|
|
|
| tenny1204 (2) | |
| yezzz thank you ver much. | |
|
|
|