By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,305 Members | 1,619 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,305 IT Pros & Developers. It's quick & easy.

Link Error

P: n/a
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.
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
yaniv1234567890 wrote:
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
Jul 22 '05 #2

P: n/a
yaniv1234567890 wrote:
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.
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.