Print Page | Close Window

Building Hello World sample for VS2010

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2310
Printed Date: 16 Jul 25 at 7:14PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Building Hello World sample for VS2010
Posted By: DBF
Subject: Building Hello World sample for VS2010
Date Posted: 20 Jun 12 at 12:32AM
Hello,
 
After downloading the Quick PDF Library and installing it, the next thing I want to do is build a sample application to evaluate what are the build requirements.  So I downloaded and uncompressed the cplusplus_dll_sample, and found both a readme file and a .vcxproj file which I loaded in Visual Studio 2010.  Since there was no .sln file, there was no explicit link instruction to a .lib file to be found.  The readme file told me to copy the files QuickPDFDLL0816.cpp and QuickPDFDll0816.h from the CPlusPlus directory, and the file QuickPDFDll0816.dll from the DLL directory to my working directory.  The problem is: shouldn't there be a QuickPDFDll0816.lib file required with the link property?  Hence I get about 12 unresolved externals.
 
This would be mitigated with a .sln and a .vcxproj.filters files that should be included with the sample applicaton.  But, in the meantime, what else am I supposed to do to make this sample program build on Visual Studio 2010?
 
And, yes I have already inserted our evaluation license key in the appropriate file.
 
Thanks,
Dave



Replies:
Posted By: AndrewC
Date Posted: 20 Jun 12 at 12:58PM
This question should really be posted to the "Forum Home  http://www.quickpdf.org/forum/default.asp - Forum Home  >  http://www.quickpdf.org/forum/default.asp?C=3&title=for-users-of-the-library - For Users of the Library  >  http://www.quickpdf.org/forum/forum_topics.asp?FID=15&title=i-need-help-i-can-help - I need help - I can help " section.

The QuickPDFDLL0816.cpp has code to dynamically load the DLL so no .LIB file is required when using the DLL version.

There is a Getting Started.pdf file in the CPlusPlus directory for the Quick PDF Install.

---------------------------------

Here is some sample code for a Console App.  Make sure you include QuickPDFDLL0816.cpp file in your project as well.


#include "stdafx.h"
#include "QuickPDFDLL0816.h"

#include <stdio.h>
#include <tchar.h>

#include "string"
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
FILE *fp;
QuickPDFDLL0816  QP(L"quickpdfdll0816.dll");

wstring ss = L"Factura.pdf";

if (QP.UnlockKey(_T("< INSERT YOUR KEY HERE >")) == 1)
{
int fh = QP.DAOpenFile((wchar_t *)ss.c_str(), L"");
int pageref = QP.DAFindPage(fh, 1);

wstring txt = QP.DAExtractPageText(fh, pageref, 8);

QP.DACloseFile(fh);

fopen_s(&fp, "f:\\users\\andrew\\downloads\\out.txt", "wt");
_ftprintf(fp, _T("%s\n"),  (LPCTSTR)txt.c_str());
fclose(fp);
}

return 0;
}



Posted By: DBF
Date Posted: 20 Jun 12 at 7:13PM
Sorry about the wrong forum.  I included QuickPDFDLL0816.cpp to the project and it links now.  Thanks.  This file should already be included in the .vcxproj file.
 
Dave


Posted By: Ingo
Date Posted: 20 Jun 12 at 8:00PM
It's moved now ;-)

Cheers and welcome here,
Ingo



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk