From 58fc663688e670a91f929dc514abec312737055a Mon Sep 17 00:00:00 2001 From: Tyler Yankee Date: Thu, 11 Dec 2025 08:27:30 -0500 Subject: Tutorial: Provide MSVC example to build Vendor library Allow Windows users who aren't familiar with MSVC-equivalent commands to GCC and/or don't have the GNU toolchain installed (via MinGW, etc.) to practice this example. --- Help/guide/tutorial/In-Depth CMake Target Commands.rst | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Help/guide/tutorial/In-Depth CMake Target Commands.rst b/Help/guide/tutorial/In-Depth CMake Target Commands.rst index 322d65a..842b0d5 100644 --- a/Help/guide/tutorial/In-Depth CMake Target Commands.rst +++ b/Help/guide/tutorial/In-Depth CMake Target Commands.rst @@ -447,14 +447,26 @@ Getting Started You will need to build the vendor library into a static archive to complete this exercise. Navigate to the ``Help/guide/tutorial/Step4/Vendor/lib`` directory -and build the code as appropriate for your platform. On Unix-like operating -systems the appropriate commands are usually: +and build the code as appropriate for your platform. + +Typical commands for a GCC toolchain on Unix-like systems are: .. code-block:: console - g++ -c Vendors.cxx + g++ -c Vendor.cxx ar rvs libVendor.a Vendor.o +Likewise, sample commands for an MSVC toolchain on Windows are: + +.. code-block:: console + + cl -c Vendor.cxx + lib -out:Vendor.lib Vendor.obj + +Here, since you're directly invoking ``cl`` and ``lib``, make sure to use a +Developer Command Prompt for your version of Visual Studio with the same +target architecture used by this CMake project. + Then complete ``TODO 11`` through ``TODO 14``. .. note:: -- cgit v0.12