Connecting Tech Pros Worldwide Help | Site Map

Link Error

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 22nd, 2005, 06:01 PM
yaniv1234567890
Guest
 
Posts: n/a
Default Link Error

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.



  #2  
Old July 22nd, 2005, 06:01 PM
Victor Bazarov
Guest
 
Posts: n/a
Default Re: Link Error

yaniv1234567890 wrote:[color=blue]
> 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 ?[/color]

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
  #3  
Old July 22nd, 2005, 06:01 PM
Pete Chapman
Guest
 
Posts: n/a
Default Re: Link Error

yaniv1234567890 wrote:
[color=blue]
> 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.
>
>[/color]


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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.