If you're compiling C++ on Windows or porting a GCC-based build to MSVC, this covers the essentials: translating optimization flags, choosing between /MT and /MD runtimes (the main source of LNK2038 errors), and using clang-cl as a drop-in replacement for cl.exe. The flag translation table alone saves you from hunting through MSVC documentation every time you need the equivalent of -O2 or -g. It also walks through vcvars setup, PDB generation, and diagnosing the usual linker mismatches. Honestly, the runtime library section should be required reading for anyone who's ever seen a "mismatch detected for RuntimeLibrary" error and wondered why their third-party library won't link.

skills.sh installs
671
GitHub stars
279
last updated
Aug 21, 2026

Install

$ npx -y skills add mohitmishra786/low-level-dev-skills --skill msvc-cl --agent claude-code

Installs into .claude/skills of the current project.

Files

MSVC cl.exe and clang-cl

Purpose

Guide agents through Windows C/C++ compilation: MSVC cl.exe, clang-cl as MSVC-compatible driver, MSBuild project settings, and runtime library choices.

Triggers

  • "How do I compile with MSVC from the command line?"
  • "What is the MSVC equivalent of -O2?"
  • "/MT vs /MD — which do I use?"
  • "How do I use clang-cl instead of cl.exe?"
  • "I'm getting LNK errors on Windows"
  • "How do I generate PDB files?"

Workflow

1. Set up the environment

MSVC requires the Visual Studio environment variables. Use the Developer Command Prompt or set up manually:

REM x64 native
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"

REM x86 cross (host x64, target x86)
"...\vcvarsamd64_x86.bat"

REM Check compiler version
cl /?

In CMake, use the "Visual Studio 17 2022" generator or pass -DCMAKE_GENERATOR="Visual Studio 17 2022".

2. Flag translation: GCC → MSVC

Sponsors

Details

Repository
github.com/mohitmishra786/low-level-dev-skills
Category
Design & UI/UX
First seen
Jun 3, 2026

More from mohitmishra786/low-level-dev-skills

All 54
1aj-geddes avatargitlab-cicd-pipelineaj-geddes/useful-ai-promptsDesign and implement GitLab CI/CD pipelines with stages, jobs, artifacts, and caching. Configure runners, Docker integration, and deployment strategies.669skills.sh installs
2unbrowse-ai avatarunbrowseunbrowse-ai/unbrowseThe action engine of the internet. Unbrowse is the open-source action layer for AI agents: it learns a site's internal API routes from real browsing, then repla669skills.sh installs
3product-on-purpose avatartool-foundation-sprint-approach-optionsproduct-on-purpose/pm-skillsDay 2 morning move of a Foundation Sprint. Forces generation of 3 to 7 candidate approaches as one-page summaries before the team converges on a top bet. Use af667skills.sh installs
4joellewis avataraccount-opening-workflowjoellewis/finance_skillsDesign and operate back-office account opening pipelines from application intake through custodian submission and activation. Use when building account opening 666skills.sh installs
5jpudysz avatarreact-native-unistyles-v3jpudysz/react-native-unistylesGuide for using react-native-unistyles v3. Triggers on: "unistyles", "StyleSheet.create", "create stylesheet", "add theme", "breakpoints", "variants", "withUnis666skills.sh installs
6alirezarezvani avatarmcp-server-builderalirezarezvani/claude-skillsDesign and ship production-ready MCP (Model Context Protocol) servers from OpenAPI contracts instead of hand-written tool wrappers. Python and TypeScript suppor663skills.sh installs