Using VC 7.1 to Build for AutoCAD 2000/2002/2004


Despite the minor numerical change from Visual C/C++ version 7 to 7.1, Microsoft made some major changes in the compiler and linker in order to become more C++ standard compliant. These changes make it virtually impossible to use 7.1 to build for ObjectARX 2004 and earlier ObjectARX versions. The new compiler chokes on the earlier versions of ATL and MFC libraries because they were not standard compliant, yet these are required when building for ObjectARX because of its reliance upon Autodesk libraries. What's more, the tricks outlined here are not enough to solve this problem.

The new features in the VC 7.1 IDE (not to mention the bug fixes) make it more desirable than VC 7. For that reason I wrote VC Build Hook, a small add-in for VC 7.1 that solves the compiler version problem by automatically switching the environment path to the VC 7 build tool directories at build time. This causes the build process to use the VC 7 build tools instead of the incompatible ones that shipped with VC 7.1. Note that you must have a working Visual C/C++ 7 (Visual Studio .NET 2002) installation in order for the path switching to work. If you only have Visual C/C++ 7.1 available, you must purchase the downgrade to Visual C/C++ 7 and install it also, otherwise the required VC 7 build tools won't be available on your system. This feature can be enabled for an entire solution or for individual projects.

See this page for information about using the VC Build Hook utility.