Tags

, ,

Ok, we are in the WinRT era; but I am installing VS express 2013 update 3 Desktop version for the sole purpose of doing some WTL/data structure/graphics development and learning just to have some fun.

Tracing back the steps taken:

1. downloaded and installed VS 2013 update 3 Windows desktop version from the visual studio site.

2. Installed the Windows 7.1 SDK and remembered that I should have installed Win8.1 SDK instead.  can’t blame me; the name matched my Win OS version.  While searching for DirectX SDK for win7 (not remembering that it came bundled with the win7 SDK) I stumbled upon another insider at MSft named Chuck.  So, once I installed Win8 SDK, I shouldn’t have to worry about the DX SDK since my machine has the latest service pack and the required kb patch.

3.  Download and install WTL from sourceforge.net by running its setup script file.  the Setup.js script file is found inside the unzippedWTL90_4140_Final.zip AppWiz directory.

image

 

well, now its time to restart my machine to complete the SDK installation.

Back from a short break, launched VS xpress 2013, select new VC++ project and then WTL; only one template available under WTL. selected that one.

image

hey look, it brought up a wizard!

image

Clicked next to move on to the Application Type option,

image

hmm, nice options, but I know I’ll most likely be adding controls to either an Single Document Interface type or a Dialog based type of app; so I’ll stick with SDI for now.  I wonder what would a Multhithread SDI offer? would have to check that out some day.

clicked next

image

Another list of option! WTL sure makes it easy to get started without to much plumbing required on our part. Anyhow, went for the Generic Windows so I may better explore the generated code.

Nice, let see how everything looks; Build the fresh app, and not so nice:

image

Our compiler can’t find the required ATL header files; that’s OK will just add the ATL directory to the include path.

image

Surprised smilethat option is not available.  now, where can the user property sheet be? Let investigate the project property and what it provides.

image

image

Good, it has what I am looking for.  will go ahead and include WTL include path; while I am at it, I noticed a MACRO button.  when I clicked it, it brought up a list of macro variables the point to various paths such as $(VCTargetPath). finally pressed the apply and then the Ok (don’t they do the same anyway?)! the 200+ files found in the directory are being parsed by VC Xpress. Build the project anew. errors still present.hmm, now it’s the time to look at the WTL read me file.  It says that

C++ Express ships without ATL, you have to use a version of ATL that ships with Windows Driver Kit

That should not be a problem since we have Win8.1 SDK installed.  Sad smile the atl include directory was not copied over during the SDK installation.  Will try to manually copy over the files.

ran the following from a command prompt with elevated priviledge:

msiexec /a “filepath to MSI file” /qb TARGETDIR=”filepath to target folder”

well, the ATL headers are not included. last option is to install the trial version of a Visual Studio paid version .  That worked; atlmfc directory is finally created under VC directory.

image

now instead of 101 errors, I am getting 05 errors.image

the complains are in atlcore.h, simply because the definition _USING_V110_SDK71_ is not created.  Basically, with this definition, atl is trying to invoke depreciated function only available from previous pre-Win7 SDKs. so I added #define _USING_V110_SDK71_  to the project stdafx.h file and that reduced error counts to 2.

image

Went back to the project property and re-added $(ExcludePath) to the Exclude directory, and that reduced the error counts to 01. paying attention to the warnings, I easily detected the collision  between Win8.1 SDK and Win7.1 SDK. removing Win 7.1A SDK from the include path removed all warnings.  The last error which remains is:

Error    2    error LNK1104: cannot open file ‘atlthunk.lib’   

image

Searched my drive for such file and didn’t find it; took the search to the web and found out that the ‘atlthunk.lib’  is available as part of Device Driver Kit.  so now, I will download the latest DDK version and install it.

image

 

Perhaps, as look back over the comment from WTL readme file,

C++ Express ships without ATL, you have to use a version of ATL that ships with Windows Driver Kit

image

 

All that was necessary only required the installation of Windows SDK and Windows Driver Kit. I jumped the gun a bit too fast and ran looking for the VS trial versions instead.  Here are the include and library directories included:

image

image

And VOILA my running WTL demo app:

 

image

Advertisements