Summary: Discusses the “Failed to locate: CL.exe” error using Visual Studio 2010.
I recently downloaded the Rhino 5 C++ SDK and installed it on my system, along with Visual Studio 2010 Professional, per the instructions on the development web page. However, when I went to build a test plug-in, it failed to compile.
Here is the message that the compiler gave me:
1>------ Build started: Project: Test, Configuration: Debug Win32 ------ 1>Build started 3/15/2013 10:47:05 AM. 1>PrepareForBuild: 1> Creating directory "C:\Visual Studio 2010\Projects\Test\Debug\". 1>InitializeBuildStatus: 1> Creating "Debug\Test.unsuccessfulbuild" because "AlwaysCreate" was specified. 1>TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:00.24 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
How can I resolve this issue?
Visual Studio 2010 will only build 64-bit plug-ins for Rhino 5. To build 32-bit plug-ins for Rhino 5, you need Visual Studio 2005.
If you do not have a copy of Visual Studio 2005, you can obtain one by purchasing a Visual Studio Professional with MSDN subscription.
If you are unable to obtain a copy of Visual Studio 2005, then you will only be able to build 64-bit plug-ins.
With Visual Studio 2010, a project can target a different version of the Visual C++ libraries and compiler. This is done by configuring the project use a different Platform toolset.
Reviewing the above image, you can see that the Rhino 5 plug-in project wizard configures 32-bit builds to use the v80rhinos platform toolset, which equates to using Visual Studio 2005's libraries and compiler. This platform toolset configuration is installed on your system by the Rhino C++ SDK Installer.
If you change the active platform from Win32 to x64, you will see that 64-bit builds will use v100, or Visual Studio 2010.
The advantage that platform toolsets provide is that they enable you to take advantage of the IDE enhancements in Visual Studio 2010 while you continue to use an older version of the Visual C++ libraries and compiler.