Visual Studio 2010 ATL Build errors for Viewer C FullDemo

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

uMarko
User
Posts: 17
Joined: Mon Feb 06, 2012 6:15 pm

Visual Studio 2010 ATL Build errors for Viewer C FullDemo

Post by uMarko »

How can I do a Build of the Viewer SDK FullDemo C example (not the C# example) in Visual Studio 2010 SP1? My experience is in MFC, not ATL, so I am unfamiliar with the errors that I am getting.

C1083: Cannot open include file: 'atlapp.h': No such file or directory c:\files\vsnetwrk\samples\pdf-xchange viewer activex sdk\c\fulldemo\stdafx.h

I also get more include errors in stdafx.h on the following lines:

Code: Select all

#include <atlapp.h>
#include <atlframe.h>
#include <atlctrls.h>
#include <atldlgs.h>
#include <atlmisc.h>
I was unable to locate the atlapp.h anywhere in my VS10 or Visual Studio 2008 development environments.

I also get a Build error on the line

Code: Select all

#import "..\..\..\Bin\PDFXCviewAx.tlb" no_namespace, named_guids, raw_interfaces_only
that tells me I am missing the file PDFXCviewAx.tlh, which I cannot find in the example.

cannot open source file "C:/Program Files/Tracker Software/PDF-XChange Viewer SDK/Examples/CExamples/FullDemo/Debug/PDFXCviewAx.tlh"

Please tell me how to Build without errors? Thanks.
Walter-Tracker Supp
User
Posts: 381
Joined: Mon Jun 13, 2011 5:10 pm

Re: Visual Studio 2010 ATL Build errors for Viewer C FullDem

Post by Walter-Tracker Supp »

I would recommend you go to the properties page of the solution (right-click it in the Solution Explorer pane) and under Configuration Properties->General, check the setting for "Use of ATL" and ensure it is set to either static or dynamic linkage (but not "Not using ATL").
uMarko
User
Posts: 17
Joined: Mon Feb 06, 2012 6:15 pm

Re: Visual Studio 2010 ATL Build errors for Viewer C FullDem

Post by uMarko »

It is set to "Static Link to ATL", so that's not the problem.
Walter-Tracker Supp
User
Posts: 381
Joined: Mon Jun 13, 2011 5:10 pm

Re: Visual Studio 2010 ATL Build errors for Viewer C FullDem

Post by Walter-Tracker Supp »

Oops, my apologies. I misread the problem.

The issue is that atlapp.h is part of the Windows Template Library which you can download for free from Microsoft:

http://www.microsoft.com/download/en/de ... px?id=9668

Once you have installed it you must make sure that your include directories for the project point to the directory in which it is installed. I believe you can choose this directory during installation.
uMarko
User
Posts: 17
Joined: Mon Feb 06, 2012 6:15 pm

Re: Visual Studio 2010 ATL Build errors for Viewer C FullDem

Post by uMarko »

I thought you might say that. Your link is to WTL 8.0, which is dated 6/15/2007.

It seems that after Visual Studio 2005 Microsoft gave up on updating WTL. I found that it moved to http://sourceforge.net/projects/wtl/, which has WTL 8.1.11324 dated 11/21/2011 (good for VS10 I guess) and 8.1.9127 (VS08 maybe).
Walter-Tracker Supp
User
Posts: 381
Joined: Mon Jun 13, 2011 5:10 pm

Re: Visual Studio 2010 ATL Build errors for Viewer C FullDem

Post by Walter-Tracker Supp »

Yes, WTL 8.1 is what I used to compile the examples (VS 2010 on Windows 7, 32 bit build on a 64 bit machine). I have 9127 installed.