I am trying to re-compile DCMTK with support for some external libraries (libtiff, libpng, ...). As mentioned in INSTALL file, I used CMake to generate a new VC project file. In CMake, after I clicked the Configure button, I got this error:
The C compiler "cl" is not able to compile a simple test program.
It fails with the following output:
-------------Configuration: cmTryCompileExec - Win32 Debug-------------
Compiling ...
Error spawning cl.exe
I am using Windows 2000 SP4, VC++6.0 SP6, and Cmake 2.0.6.
This error means that the VC++ IDE could not find cl.exe on your machine.
First check if cl.exe exists and where it is.
Then start the VC++ IDE:
1) Go to Tools --> Options
2) Click "directories"
3) Under "Show directories for", choose "Executable files"
4) Check if the directory that contains cl.exe is listed in the list of directories
5) If no, just add it in the list
On Windows, WITH_LIBPNG etc. are defined in the project files generated by CMake, depending on the compiler for which you are generating the project file. This is not something you would like to touch manually since CMake will overwrite your changes the next time you use it anyway. On Posix platforms, the WITH_LIBPNG etc. options are defined in <dcmtk/config/cfunix.h>.