Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

Samples

Several simple sample shell applications are provided to illustrate basic usage of the toolkit.

Note:
Microsoft Visual Studio users should consult the build configurations in the project files to see how the pre-preprocessor build flags are set.

Building the Samples

Microsoft Visual Studio

Simply open the Visual Studio project file or solution and build the desired configuration. DLL build configurations will required that the appropriate (debug or release) version of dwftk.1.0.1.dll (and possibly whiptk.7.6.600.dll and/or w3dtk.1.0.1000.dll) is available in the path.

Note:
The samples build against the current "preferred" compiler version which at this time is MSVC 7.1. To build and run with MSVC 7.0 or MSVC 8.0, manually alter the include and link paths accordingly.

GCC (GNU Compiler Collection)

All but one of the samples that ship with the toolkit work on non-Win32 systems. The DWFGoogleDesktopCrawl sample uses the Google desktop search API which is a Windows-only COM-based interface.

Some of the samples were created in the Visual Studio development environment and are stored in Windows-brand Unicode (UTF-16LE). These files have been resaved as UTF8 with the Unicode text removed; and named with the _UTF8.cpp suffix.

Note:
If the toolkit samples fail to compile because XMLCALL is not defined, then add -DDWFTK_BUILD_EXPAT to your build options. This macro was added in Expat 1.95.7 and using an older version of expat.h will result in these errors.

Static Linking

This section shows how the sample applications can be built using the static toolkit library.

3DPublish

 g++ -I../../../develop/global/src/ -I/usr/include 3DPublish_UTF8.cpp ../../../develop/global/src/dwf/.libs/libdwftk.a -ldwfcore -ljpeg -o 3dpublish

GlobalSectionWriter

g++ -I../../../develop/global/src/ -I/usr/include GlobalSectionWriter.cpp ../../../develop/global/src/dwf/.libs/libdwftk.a -ldwfcore -o gsw

ObjectDefinitionReader

g++ -I../../../develop/global/src/ -I/usr/include ObjectDefinitionReader.cpp ../../../develop/global/src/dwf/.libs/libdwftk.a -ldwfcore -o objdefreader

SimpleEnumReader

g++ -I../../../develop/global/src/ -I/usr/include SimpleEnumReader.cpp ../../../develop/global/src/dwf/.libs/libdwftk.a -ldwfcore -o enumreader

SimpleEPlotWriter

g++ -I../../../develop/global/src/ -I/usr/include SimpleEPlotWriter_UTF8.cpp ../../../develop/global/src/dwf/.libs/libdwftk.a -ldwfcore -o eplotwriter

SimpleW3DStreamProcessor

g++ -I../../../develop/global/src/ -I/usr/include SimpleW3DStreamProcessor.cpp ../../../develop/global/src/dwf/.libs/libdwftk.a -ldwfcore -ljpeg -o w3dreader

TimedXMLReader

g++ -I../../../develop/global/src/ -I/usr/include TimedXMLReader.cpp ../../../develop/global/src/dwf/.libs/libdwftk.a -ldwfcore -o timedreader

See the GCC Static Linking section of the main page for more details.

Dynamic Linking

This sections show how the sample applications can be built using the shared toolkit library.

3DPublish

g++ 3DPublish_UTF8.cpp -ldwfcore -ldwftk -o 3dpublish

GlobalSectionWriter

g++ GlobalSectionWriter.cpp -ldwfcore -ldwftk -o gsw

ObjectDefinitionReader

g++ ObjectDefinitionReader.cpp -ldwfcore -ldwftk -o objdefreader

SimpleEnumReader

g++ SimpleEnumReader.cpp -ldwfcore -ldwftk -o enumreader

SimpleEPlotWriter

g++ SimpleEPlotWriter_UTF8.cpp -ldwfcore -ldwftk -o eplotwriter

SimpleW3DStreamProcessor

g++ SimpleW3DStreamProcessor.cpp -ldwfcore -ldwftk -o w3dreader

TimedXMLReader

g++ TimedXMLReader.cpp -ldwfcore -ldwftk -o timedreader

Apple XCode

Developers have more options with OS X and XCode in that the same steps for GCC Static Linking and Dynamic Linking can be followed from the shell, while XCode users can take advantage of the project files provided by Apple for building the DWF Toolkit samples. These XCode projects are valuable reference resources for building your own applications with the DWF Toolkit.


Generated on Tue May 17 12:38:52 2005 for Autodesk DWF Toolkit by  doxygen 1.4.1