CellProfiler/CellProfiler — Issue #287: CP won't build with Visual Studio 2010, easy fix
Author: BioTurboNick
Created: 2012-02-15 07:49:39+00:00
State: open

Specifically, when executing the --build-and-exit command option, the compilation fails when attempting to use mt.exe, complaining that it cannot find the manifest file and failing.

Doing some searching, I discovered this: http://bugs.python.org/issue4431. Apparently something was changed between 2008 and 2010, such that /MANIFEST is no longer the default and must be made explicit.

As was suggested in the above link, the issue appears to be fixed by adding
```
extra_link_args=['/MANIFEST']
```
to the Extension definitions in cellprofiler\cpmath\setup.py (_cpmorphology, _cpmorphology2, _watershed, _propagate, _filter, _lapjv) and cellprofiler\utilities\setup.py (_get_proper_case_filename, javabridge).

This modification allows CellProfiler to build with only minor type conversion warnings, and the program runs fine afterwards. Given that the /MANIFEST flag should not adversely affect prior versions of the compiler from what I understand, this change should be considered.