Wednesday, April 13, 2011

C++ Project Porting Nightmare

Recently I had the task of porting two c++ projects written in the good old vc6 to vs2005. After making a couple of changes to the code and compiler options(Zm), compiling and linking was easy, in fact a no-brainer.
However, registration proved to be a nightmare. Registration is usually part of the post build process. But vs2005 seemed to hang in there and looked like it had no intention of proceeding. Googling suggested killing the process. Killing it caused vs to continue but this was wrong - there was a problem lurking somewhere.
Adding logs in the entrypoint did not help, as it seemed like main() was not getting called.
This was where I checked the binary using the dependency viewer in vs. DV indicated problematic dependencies. So it turned out libraries being used by this project had to be built in vs2005. Right!
So I built them libraries and, voila, projects compiled, built and got registered!
If only there was an indication of such issue provided by vs2005, it would have been easier. :)

No comments: