Static Version of PDF Creator Pilot with MS Visual Studio 2010
What is the difference between dynamic (.dll) and static (.lib) libraries and when is it appropriate to use which?
- When you compile a program with static libraries statically linked libraries are linked into the final executable by the linker. Static libraries increase the size of the code in your binary.
- They're always loaded and whatever version of the code you compiled with is the version of the code that will run. When a library needs to be updated you'll need to compile the new library and then recompile the application to take advantage of the new library.
- Dynamic libraries are stored separately. With dynamic libraries if all the libraries aren't present then the application doesn't run.
- When several programs use the same dynamic library, it saves space on your hard drive and memory.
- If you use a static version, you can avoid the problems that arise when you use dll-libraries (DLL hell).
To build an application with static library, the C++ compiler must know where the header and library files are, and what libraries to link against.
Within Visual Studio, right click on your project in the Solution Explorer and bring up the project's Properties dialog. You need to change the settings for both Debug and Release versions. In the Configuration field, select All Configurations.
- Change Platform Toolset. Select Configuration Properties and, choose the General options. In the Platform Toolset choose vc100 item.

- Change Additional Library Directories. Choose the General options in the Linker category of properties. In the Additional Library Directories property, enter path to the directory where PDFCreatorPilot.lib is placed.

- Next, you must tell the linker what library files to use. Select the Linker category of properties and, pick the Input options. In the Additional Dependencies property input the name of static library (StaticPDFCreator_x86_debug.lib).

Then add header files (PDFDocumentTypes.h, StaticPDFDocument4.h) in your project for using PDF document's objects. Please, download the sample code for static pdf library.
Static PDF Creator Pilot Library (both 32-bit and 64-bit version) (74M)
Please send us your comments and ideas for further development of the PDF library.
See also our Step-by-Step Tutorials to find examples of solving common tasks...