Link Error

Y

yaniv1234567890

write the next small program using wininet:

#define _UNICODE
#include <windows.h>
#include <wininet.h>
#include <TCHAR.H>

void main()
{
HINTERNET iOpen;
LPCWSTR lpName = __T("Eyal Computers Inc");
LPCWSTR lpEmpty = __T(" ");
iOpen=
InternetOpenW(lpName,INTERNET_OPEN_TYPE_PRECONFIG,lpEmpty,lpEmpty,0);

}


but i get a link error :
"XmlPost error LNK2019: unresolved external symbol __imp__InternetOpenW@20
referenced in function _main"

im using VC.net in win32 project.
what do i need to do to fix that problem ?
10x for any help.
 
V

Victor Bazarov

yaniv1234567890 said:
write the next small program using wininet:

#define _UNICODE
#include <windows.h>
[..snip..]

but i get a link error :
"XmlPost error LNK2019: unresolved external symbol __imp__InternetOpenW@20
referenced in function _main"

im using VC.net in win32 project.
what do i need to do to fix that problem ?

Ask in a Windows programming newsgroup. Your problem cannot be solved
in terms of C++ _language_. It's more likely a project setting problem.
You must be missing a library in your link command line. Which library
I don't know, and that's is beyond the scope of this newsgroup anyway.

Victor
 
P

Pete Chapman

yaniv1234567890 said:
write the next small program using wininet:

#define _UNICODE
#include <windows.h>
#include <wininet.h>
#include <TCHAR.H>

void main()
{
HINTERNET iOpen;
LPCWSTR lpName = __T("Eyal Computers Inc");
LPCWSTR lpEmpty = __T(" ");
iOpen=
InternetOpenW(lpName,INTERNET_OPEN_TYPE_PRECONFIG,lpEmpty,lpEmpty,0);

}


but i get a link error :
"XmlPost error LNK2019: unresolved external symbol __imp__InternetOpenW@20
referenced in function _main"

im using VC.net in win32 project.
what do i need to do to fix that problem ?
10x for any help.


This is off-topic really. But off the top of my head I'd guess you need
to add wininet.lib as a linker input in your project settings.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,175
Messages
2,570,942
Members
47,490
Latest member
Finplus

Latest Threads

Top