Solved

Simple WinInet problem

Posted on 2000-02-18
3
1,060 Views
Last Modified: 2013-11-20
I have a program [sample] from MSDN which gets a file from an internet address thru a proxy server. I am not able to link the file ...
get the following errors
r.obj : error LNK2001: unresolved external symbol __imp__InternetOpenA@20
r.obj : error LNK2001: unresolved external symbol __imp__InternetErrorDlg@20
r.obj : error LNK2001: unresolved external symbol __imp__InternetSetOptionA@16
r.obj : error LNK2001: unresolved external symbol __imp__InternetReadFile@16
r.obj : error LNK2001: unresolved external symbol __imp__InternetQueryDataAvailable@16
r.obj : error LNK2001: unresolved external symbol __imp__HttpQueryInfoA@20
r.obj : error LNK2001: unresolved external symbol __imp__InternetQueryOptionA@16
r.obj : error LNK2001: unresolved external symbol __imp__HttpSendRequestA@20
r.obj : error LNK2001: unresolved external symbol __imp__InternetOpenUrlA@24
r.obj : error LNK2001: unresolved external symbol __imp__InternetGetLastResponseInfoA@12
Debug/r.exe : fatal error LNK1120: 10 unresolved externals

I'm new to MFC programming so I don't know what the problem is.....should have to link in some other lib perhaps ???
0
Comment
Question by:bluezen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
oarguimb earned 50 total points
ID: 2534622
I think it's just a link problem.

Have you tried to add Wininet.lib to your project ? (If it fails read the help perhaps you have to add a higher level library...but try wininet.lib first)

To add this lib just go to you project settings and in the link tab just add WININET.LIB in "Object/library modules" edit box.
0
 
LVL 1

Expert Comment

by:mahno
ID: 2534624
Hi, bluezen

In "Project->Setting->General->Microsoft Foundation Classes" U select "Use MFC in a static labrary" / "Use MFC in a shared DLL"?
0
 
LVL 1

Author Comment

by:bluezen
ID: 2535987
Thanks !!!
That was a very clear answer and it solved my problem !
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question