Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
There are many errors when I compile those programs with VC6.0, the article that the author writes is "WTL for MFC Programmers"?
Posted
Comments
Manfred Rudolf Bihy 11-Mar-13 7:34am    
Please add a comment to the article and do ask the author, if it isn't clear already from the article in question.
Manfred Rudolf Bihy 11-Mar-13 7:37am    
I just checked and found out that this is a multi part article. You should at least have mentioned which part you are referring to.
MCGRADYV5 11-Mar-13 7:41am    
All the demo programs the author provided have some errors when I compile with vc6.0. I am wondering whether he use another anohter edition of Visual Studio.
MCGRADYV5 11-Mar-13 7:49am    
I did have download the sdk and set the include path.

1 solution

Well I don't know which article you read, but I just skimmed over the beginning of part one in his series and found this:

SQL
This is the stuff I want you to read first, before proceeding on or posting messages to this article's discussion board.

This series of articles originally covered WTL 7.0 and written for VC 6 users. Now that VC 8 is out, I felt it was about time to update the articles to cover VC 7.1. ;) (Also, the automatic 6-to-7 conversion done by VC 7.1 doesn't always go smoothly so VC 7.1 users could get stuck when trying to use the demo source code.) So as I go through and update this series, the articles will be updated to reflect new WTL 7.1 features, and I'll have VC 7.1 projects in the source downloads.

Important note for VC 2005 users: The Express edition of VC 2005 does not come with ATL (or MFC for that matter) so you can't build ATL or WTL projects with the Express version.

If you are using VC 6, then you need the Platform SDK. You can't use WTL without it. You can use the web install version, or download the CAB files or an ISO image and run the setup locally. Be sure you use the utility to add the SDK include and lib directories to the VC search path. You can find this in the Visual Studio Registration folder in the Platform SDK program group. It's a good idea to get the latest Platform SDK even if you're using VC 7 so you have the latest headers and libs.

You need WTL. Download version 7.1 from Microsoft. See the articles "Introduction to WTL - Part 1" and "Easy installation of WTL" for some tips on installing the files. Those articles are rather out-of-date now, but still contain some good info. The WTL distribution also has a readme file with installation instructions. One thing which I don't think is mentioned in those articles is how to add the WTL files to the VC include path. In VC 6, click Tools|Options and go to the Directories tab. In the Show directories for combo box, select Include files. Then add a new entry that points to the directory where you put the WTL header files. In VC 7, click Tools|Options, click Projects then VC++ Directories. In the Show directories for combo box, select Include files. Then add a new entry that points to the directory where you put the WTL header files.

Important: While we're on the subject of the VC 7 include path, you must make a change to the default directory list if you haven't updated your Platform SDK. Make sure that $(VCInstallDir)PlatformSDK\include is first in the list, above ($VCInstallDir)include, as shown here:

Quote from Michael Dunn's "WTL for MFC Programmers, Part I"
See especially the fourth paragraph. It's the one that starts with "If you use VC 6, you'll need the Platform SDK...".

Regards,

— Manfred
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900