By default, applications created using the 64-bit versions of WinDriver are 64-bit applications. Such applications are more efficient than 32-bit applications. However, you can also use the 64-bit WinDriver versions to create 32-bit applications that will run on the supported Windows and Linux 64-bit platforms [A.1].
![]() | |
| In the following documentation, <WD64> signifies the path to a 64-bit WinDriver installation directory for your target operating system, and <WD32> signifies the path to a 32-bit WinDriver installation directory for the same operating system. |
To create a 32-bit application for 64-bit Windows or Linux platforms, using the 64-bit version of WinDriver, do the following:
Add a KERNEL_64BIT preprocessor definition to your
project or makefile.
![]() | |
In the makefiles, the definition is added using the -D
flag: -DKERNEL_64BIT.
|
The sample and wizard-generated Linux makefiles and Windows MSDEV projects, in the 64-bit WinDriver toolkit, already add this definition.
Link the application with the specific version of the WinDriver API library/shared object for 32-bit applications executed on 64-bit platforms – <WD64>\lib\amd64\x86\wdapi1020.lib on Windows <WD64>/lib/libwdapi1020_32.so on Linux.
On Linux, the installation of the 64-bit WinDriver toolkit on the
development machine creates a
libwdapi1020.so symbolic link
in the /usr/lib directory –
which links to
<WD64>/lib/libwdapi1020_32.so
– and in the /usr/lib64 directory
– which links to
<WD64>/lib/libwdapi1020.so
(the 64-bit version of this shared object).
The sample and wizard-generated WinDriver makefiles rely on these symbolic
links to link with the appropriate shared object, depending on whether
the code is compiled using a 32-bit or 64-bit compiler.
On Windows, the sample and wizard-generated MSDEV projects are defined
to link with wdapi1020.lib (see
the AdditionalDependencies), but the linker library path
refers to the 64-bit library file in the
<WD64>\lib\amd64 directory (see
AdditionalLibraryDirectories); when using such a project
to compile a 32-bit application for 64-bit platforms, add
\x86 to the library path in order to link the
code with
<WD64>\lib\amd64\x86\wdapi1020.lib.
![]() | |
|