# std **Repository Path**: loong-lang/std ## Basic Information - **Project Name**: std - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-06 - **Last Updated**: 2026-03-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # loong-lang-std ``` # 列出预制名 cmake --list-presets MSVC: cmake -G "Visual Studio 17 2022" -S . -B build_msvc "-DCMAKE_C_FLAGS=/utf-8" "-DCMAKE_CXX_FLAGS=/utf-8" MSYS2 Debug: cmake --preset=msys2-debug -B build_msys2_debug ninja -C build_msys2_debug MSYS2 Release: cmake --preset=msys2-release -B build_msys2_release ninja -C build_msys2_release Ubuntu Debug: cmake --preset=ubuntu-debug -B build_ubuntu_debug ninja -C build_ubuntu_debug Ubuntu Release: cmake --preset=ubuntu-release -B build_ubuntu_release ninja -C build_ubuntu_release ``` 项目 -> 配置属性 -> C/C++ -> 代码生成 -> 运行库: Debug 选择: 多线程调试 DLL (/MDd) Release 选择: 多线程 DLL (/MD) --- MSVC Project Properties > Configuration Properties > C/C++ > Code Generation: runtime 运行时选择: 静态运行时: /MT: Statically link the release C runtime. /MTd: Statically link the debug C runtime Set the Runtime Library: For Release builds, change the Runtime Library setting to Multi-threaded (/MT). This uses libcmt.lib. For Debug builds, change the Runtime Library setting to Multi-threaded Debug (/MTd). This uses libcmtd.lib. 动态运行时: executable/DLL) in your solution that will be linked together. All components must use the same /MT or /MTd ## Understanding C Runtime Libraries in MSVC When you build a C++ project in Visual Studio, you choose a runtime library option that determines how the C/C++ runtime (CRT) functions are handled. The key options related to libcmt.lib and DLLs are: /MT (Multithreaded, Static Release): Links your code with libcmt.lib. The C runtime code is statically compiled into your DLL/EXE. There is no external runtime DLL dependency for the CRT itself. /MD (Multithreaded, Dynamic Release): Links with msvcrt.lib (an import library) which uses the msvcrt*.dll series of DLLs (e.g., msvcr120.dll, vcruntime140.dll, etc.) at runtime. This is the option used when you want your application or DLL to use a shared, redistributable runtime DLL Location: The library file is typically located within your Visual Studio installation directory, under the appropriate architecture-specific lib folder (e.g., ...VC\Tools\MSVC\[version]\lib\[architecture]). 示例: D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\lib\x64\