Visual Assert – The Unit Testing Add-In for Visual C++
cfix – C/C++ Unit Testing for Win32 and NT
 
 

Supported Compilers and Linkers

Supported Compilers and Linkers

cfix only supports the Microsoft compiler and linker, cl.exe and link.exe. Other compilers may work, but have not been tested.

Visual Studio

cfix supports and has been tested with Visual Studio 2003 (i.e. cl version 13.10) onward. Note, however, that a small amount of features is not supported for cl 13.00/Visual Studio 2003 and is only available for cl 14.00/Visual Studio 2005 and later releases.

WDK

For development with the WDK, use at least WDK 6000. Although older DDKs (3790, 3790.1830) work, they are outdated and may require certain build settings to be adjusted.

[Note]Note

When using WDK 7600 to build kernel mode unit test binaries for the amd64 architecture using the WIN7 build environment, you may suffer from the following linker error:

error fatal error C1047: The object or library file ‘…\lib\amd64\cfixkdrv.lib’ was created with an older compiler than other objects; rebuild old objects and libraries

The reason for this is that the WIN7/amd64 build environment, unlike other build environments and those of older WDKs, makes use of Link Time Code Generation (LTCG). LTCG, however, requires that all binaries that are to be linked (in particular: static libraries such as cfixkdrv.lib) also be built using LTCG and the same compiler version. Because cfix also targets downlevel WDKs, this is currently not the case for cfixkdrv.lib. To resolve this issue, disable LTCG by specifying

USER_C_FLAGS=/GL-
					

in your SOURCES file.

For more information, please refer to the post LTCG issues with the WIN7/amd64 environment of WDK 7600 on Johannes Passing's blog.