跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[问与答] [求助] Windows vscode Cmake 编译时插件输出乱码

发表于

我家里的电脑使用 cmake 编译 dll 时输出乱码如下

[main] 正在生成文件夹: c/build testdll
[build] 正在启动生成
[proc] 执行命令: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build c/build --config Release --target testdll -j 26 --
[build] 閫傜敤浜� .NET Framework MSBuild 鐗堟湰 17.11.9+a69bbaaf5
[build] 
[build]   testdll.vcxproj -> \c\build\Release\testdll.dll
[driver] 生成完毕: 00:00:00.365
[build] 生成已完成,退出代码为 0

已在C:\Users\username\Documents\PowerShell\Microsoft.PowerShell_profile.ps1添加了 chcp 切换编码

chcp 65001 | Out-Null

已在 vscode settings.json 添加启动命令,并且有效

    "terminal.integrated.profiles.windows": {
        "PowerShell": {
            "source": "PowerShell",
            "icon": "terminal-powershell",
            "args": [
                "-NoExit",
                "/c",
                "chcp 65001",
            ],
        },
        "Command Prompt": {
            "path": [
                "${env:windir}\\Sysnative\\cmd.exe",
                "${env:windir}\\System32\\cmd.exe"
            ],
            "args": [],
            "icon": "terminal-cmd"
        },
        "Git Bash": {
            "source": "Git Bash"
        }
    },
    
Active code page: 65001
\c :: git(master)                                                                                                                                                                                                                                                                                                                              00:07:35  
➜ chcp
活动代码页: 65001

但我另外一台电脑是正常的,

[main] 正在生成文件夹: c/build hello
[build] 正在启动生成
[proc] 执行命令: "\cmake.exe" --build c/build --config Debug --target hello -j 22 --
[build] 适用于 .NET Framework MSBuild 版本 17.9.8+b34f75857
[build] 
[build]   1>Checking Build System
[build]   Building Custom Rule c/CMakeLists.txt
[build]   helloworld.c
[build]   hello.vcxproj -> c\build\Debug\hello.exe
[driver] 生成完毕: 00:00:02.853
[build] 生成已完成,退出代码为 0

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.