plugin-created terminal doesn't compatible with latest mingw GCC 13.1.0
Brief Issue Summary
Nothing is outputed when using CMake/Launch terminal, which is created by this cmake plugin, when using mingw GCC 13.1.0, but everything is fine with mingw GCC 12.2.0.
Work space
The work space contains only two simple file, CMakeLists.txt and main.cpp, and their contents are:
project(simple_test)
cmake_minimum_required(VERSION 3.20)
add_executable(main main.cpp)
#include <iostream>
int main()
{
std::cout << "Hello there" << std::endl;
}
Using GCC 12.2.0 (Fine)
[cmake] Not searching for unused variables given on the command line.
[cmake] -- The C compiler identification is GNU 12.2.0
[cmake] -- The CXX compiler identification is GNU 12.2.0
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] -- Check for working C compiler: C:/mingw64-12/bin/gcc.exe - skipped
[cmake] -- Detecting C compile features
[cmake] -- Detecting C compile features - done
[cmake] -- Detecting CXX compiler ABI info
[cmake] -- Detecting CXX compiler ABI info - done
[cmake] -- Check for working CXX compiler: C:/mingw64-12/bin/g++.exe - skipped
[cmake] -- Detecting CXX compile features
[cmake] -- Detecting CXX compile features - done
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: D:/learning/simple_test/build
And run target main, output is there:
Using GCC 13.1.0 (Bug)
[cmake] Not searching for unused variables given on the command line.
[cmake] -- The C compiler identification is GNU 13.1.0
[cmake] -- The CXX compiler identification is GNU 13.1.0
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] -- Check for working C compiler: C:/mingw64/bin/gcc.exe - skipped
[cmake] -- Detecting C compile features
[cmake] -- Detecting C compile features - done
[cmake] -- Detecting CXX compiler ABI info
[cmake] -- Detecting CXX compiler ABI info - done
[cmake] -- Check for working CXX compiler: C:/mingw64/bin/g++.exe - skipped
[cmake] -- Detecting CXX compile features
[cmake] -- Detecting CXX compile features - done
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: D:/learning/simple_test/build
Adn run target main again, output is gone:
And I can't even get output when manually run this built program:
But when I use a self-created shell, it does output!
Conclusion
So I believe that something must went wrong using latest mingw GCC 13.1.0, and problem is caused by this vscode extension.
The following CMake Tools Diagnostics and Debug Log came with mingw GCC 13.1.0 selected.
CMake Tools Diagnostics
{
"os": "win32",
"vscodeVersion": "1.78.2",
"cmtVersion": "1.14.31",
"configurations": [
{
"folder": "d:\\learning\\simple_test",
"cmakeVersion": "3.25.3",
"configured": true,
"generator": "MinGW Makefiles",
"usesPresets": false,
"compilers": {
"C": "C:/mingw64/bin/gcc.exe",
"CXX": "C:/mingw64/bin/g++.exe"
}
}
],
"cpptoolsIntegration": {
"isReady": true,
"hasCodeModel": true,
"activeBuildType": "Debug",
"buildTypesSeen": [
"Debug"
],
"requests": [],
"responses": [],
"partialMatches": [],
"targetCount": 1,
"executablesCount": 1,
"librariesCount": 0,
"targets": [
{
"name": "main",
"type": "EXECUTABLE"
}
]
},
"settings": [
{
"communicationMode": "automatic",
"useCMakePresets": "auto",
"configureOnOpen": true
}
]
}
Debug Log
[main] Safe constructing new CMakeProject instance
[variant] Constructing VariantManager
[main] Constructing new CMakeProject instance
[main] Starting CMake Tools second-phase init
[variant] Loaded new set of variants
[kit] Reading kits file C:\Users\Gorun\AppData\Local\CMakeTools\cmake-tools-kits.json
[kit] Successfully loaded 30 kits from C:\Users\Gorun\AppData\Local\CMakeTools\cmake-tools-kits.json
[kit] Not reading non-existent kits file: d:\learning\simple_test\.vscode\cmake-kits.json
[main] Injecting new Kit into CMake driver
[main] CMakeProject instance initialization complete.
[extension] Configuring workspace on open d:\learning\simple_test
[extension] [8827] cmake.buildDirectory started
[extension] [7316] cmake.buildDirectory started
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --version
[main] Starting new CMake driver
[main] Starting CMake driver
[cmakefileapi-driver] Creating instance of CMakeFileApiDriver
[driver] Initializating base driver using kit
[kit] Testing GCC binary: C:\mingw64\bin\gcc.exe
[proc] Executing command: C:\mingw64\bin\gcc.exe -v
[kit] Detected GCC compiler: C:\mingw64\bin\gcc.exe
[driver] CMakeDriver Kit set to GCC 13.1.0 x86_64-w64-mingw32
[kit] The environment for kit 'GCC 13.1.0 x86_64-w64-mingw32': {
"ALLUSERSPROFILE": "C:\\ProgramData",
"APPDATA": "C:\\Users\\Gorun\\AppData\\Roaming",
"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true",
"CABAL_DIR": "C:\\cabal",
"CHROME_CRASHPAD_PIPE_NAME": "\\\\.\\pipe\\LOCAL\\crashpad_5552_YIJGHTNXKJXFXUKT",
"CMAKE_PREFIX_PATH": "\"C:/Program Files (x86)/Catch2/lib/cmake/Catch2/\"",
"COMPUTERNAME": "DESKTOP-50KS4PV",
"CUDA_PATH": "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6",
"CUDA_PATH_V11_6": "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6",
"ComSpec": "C:\\WINDOWS\\system32\\cmd.exe",
"CommonProgramFiles": "C:\\Program Files\\Common Files",
"CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
"CommonProgramW6432": "C:\\Program Files\\Common Files",
"DriverData": "C:\\Windows\\System32\\Drivers\\DriverData",
"EFC_4988": "1",
"ELECTRON_RUN_AS_NODE": "1",
"FPS_BROWSER_APP_PROFILE_STRING": "Internet Explorer",
"FPS_BROWSER_USER_PROFILE_STRING": "Default",
"GHCUP_INSTALL_BASE_PREFIX": "C:\\",
"GHCUP_MSYS2": "C:\\msys64",
"GOPATH": "C:\\Users\\Gorun\\go",
"HOMEDRIVE": "C:",
"HOMEPATH": "\\Users\\Gorun",
"INTEL_DEV_REDIST": "C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\",
"LOCALAPPDATA": "C:\\Users\\Gorun\\AppData\\Local",
"LOGONSERVER": "\\\\DESKTOP-50KS4PV",
"MIC_LD_LIBRARY_PATH": "C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\compiler\\lib\\mic",
"NUMBER_OF_PROCESSORS": "16",
"NVTOOLSEXT_PATH": "C:\\Program Files\\NVIDIA Corporation\\NvToolsExt\\",
"ORIGINAL_XDG_CURRENT_DESKTOP": "undefined",
"OS": "Windows_NT",
"OneDrive": "C:\\Users\\Gorun\\OneDrive",
"PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC",
"PROCESSOR_ARCHITECTURE": "AMD64",
"PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 141 Stepping 1, GenuineIntel",
"PROCESSOR_LEVEL": "6",
"PROCESSOR_REVISION": "8d01",
"PSModulePath": "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules",
"PUBLIC": "C:\\Users\\Public",
"PYTHONPATH": "D:\\learning\\py_learning\\programming_python\\PP4E-Examples-1.4\\Examples",
"Path": "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6\\libnvvp;C:\\Program Files\\Common Files\\Oracle\\Java\\javapath;%JAVA_HOME%\\bin;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\intel64\\compiler;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Bandizip\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\pypy39;C:\\Python27\\Scripts;C:\\Users\\Gorun\\AppData\\Local\\Android\\Sdk\\platform-tools;C:\\Program Files (x86)\\NetSarang\\Xftp 7\\;C:\\Program Files (x86)\\NetSarang\\Xshell 7\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Microsoft\\Web Platform Installer\\;C:\\Program Files\\dotnet\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\ghcup\\ghc\\9.4.2\\bin;C:\\Users\\Gorun\\AppData\\Local\\SumatraPDF;D:\\utils\\ffmpeg\\bin;C:\\Program Files\\VideoLAN\\VLC\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\Neovim\\bin;D:\\utils\\neovide;D:\\utils\\git_proxy;C:\\Program Files\\NVIDIA Corporation\\Nsight Compute 2022.1.1\\;C:\\Program Files\\NVIDIA\\CUDNN\\v8.8\\bin;C:\\Program Files\\Go\\bin;C:\\Program Files\\CMake\\bin;C:\\Program Files\\LLVM\\bin;C:\\Program Files\\Docker\\Docker\\resources\\bin;C:\\Program Files\\nodejs\\;C:\\local\\vcpkg;C:\\local;C:\\Users\\Gorun\\AppData\\Local\\Programs\\Python\\Python310\\Scripts\\;C:\\Users\\Gorun\\AppData\\Local\\Programs\\Python\\Python310\\;C:\\Users\\Gorun\\.cargo\\bin;C:\\Users\\Gorun\\AppData\\Local\\Programs\\Python\\Python311\\Scripts\\;C:\\Users\\Gorun\\AppData\\Local\\Programs\\Python\\Python311\\;C:\\Users\\Gorun\\AppData\\Roaming\\local\\bin;C:\\Users\\Gorun\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Gorun\\AppData\\Local\\JetBrains\\Toolbox\\scripts;C:\\Users\\Gorun\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Gorun\\.dotnet\\tools;C:\\texlive\\2022\\bin\\win32;C:\\ghcup\\bin;C:\\Users\\Gorun\\go\\bin;C:\\Users\\Gorun\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\Gorun\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\bin;C:\\Users\\Gorun\\AppData\\Local\\gitkraken\\bin;C:\\Users\\Gorun\\AppData\\Roaming\\npm;C:\\mingw64\\bin;C:\\mingw64\\bin",
"ProgramData": "C:\\ProgramData",
"ProgramFiles": "C:\\Program Files",
"ProgramFiles(x86)": "C:\\Program Files (x86)",
"ProgramW6432": "C:\\Program Files",
"SESSIONNAME": "Console",
"STACK_ROOT": "C:\\sr",
"SystemDrive": "C:",
"SystemRoot": "C:\\WINDOWS",
"TEMP": "C:\\Users\\Gorun\\AppData\\Local\\Temp",
"TMP": "C:\\Users\\Gorun\\AppData\\Local\\Temp",
"USERDOMAIN": "DESKTOP-50KS4PV",
"USERDOMAIN_ROAMINGPROFILE": "DESKTOP-50KS4PV",
"USERNAME": "Gorun",
"USERPROFILE": "C:\\Users\\Gorun",
"VBOX_MSI_INSTALL_PATH": "C:\\Program Files\\Oracle\\VirtualBox\\",
"VCPKG_ROOT": "C:\\local\\vcpkg",
"VS140COMNTOOLS": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\",
"VSCODE_AMD_ENTRYPOINT": "vs/workbench/api/node/extensionHostProcess",
"VSCODE_CODE_CACHE_PATH": "C:\\Users\\Gorun\\AppData\\Roaming\\Code\\CachedData\\b3e4e68a0bc097f0ae7907b217c1119af9e03435",
"VSCODE_CRASH_REPORTER_PROCESS_TYPE": "extensionHost",
"VSCODE_CRASH_REPORTER_SANDBOXED_HINT": "1",
"VSCODE_CWD": "C:\\Users\\Gorun\\AppData\\Local\\Programs\\Microsoft VS Code",
"VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
"VSCODE_IPC_HOOK": "\\\\.\\pipe\\c77c08cee42252d02075dcc4fa2d3842-1.78.2-main-sock",
"VSCODE_NLS_CONFIG": "{\"locale\":\"en\",\"osLocale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
"VSCODE_PID": "5552",
"ZES_ENABLE_SYSMAN": "1",
"_NT_SYMBOL_PATH": "srv*c:\\symbols*http://msdl.microsoft.com/download/symbols;",
"windir": "C:\\WINDOWS",
"CMT_MINGW_PATH": "C:\\mingw64\\bin"
}
[driver] Trying to detect generator supported by system
[driver] Setting new variant Debug
[main] Configuring project: simple_test
[main] Saving open files before configure/build
[driver] Start configure
[driver] Running pre-configure checks and steps
[driver] Using compilers in GCC 13.1.0 x86_64-w64-mingw32 for configure
[cmakefileapi-driver] Configuring using kit
[cmakefileapi-driver] Invoking CMake C:\Program Files\CMake\bin\cmake.EXE with arguments ["--no-warn-unused-cli","-DCMAKE_TOOLCHAIN_FILE=C:\\local\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake","-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE","-DCMAKE_BUILD_TYPE:STRING=Debug","-DCMAKE_C_COMPILER:FILEPATH=C:\\mingw64\\bin\\gcc.exe","-DCMAKE_CXX_COMPILER:FILEPATH=C:\\mingw64\\bin\\g++.exe","-SD:/learning/simple_test","-Bd:/learning/simple_test/build","-G","MinGW Makefiles"]
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_TOOLCHAIN_FILE=C:\local\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=C:\mingw64\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\mingw64\bin\g++.exe -SD:/learning/simple_test -Bd:/learning/simple_test/build -G "MinGW Makefiles"
[proc] with environment: {"ALLUSERSPROFILE":"C:\\ProgramData","APPDATA":"C:\\Users\\Gorun\\AppData\\Roaming","APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL":"true","CABAL_DIR":"C:\\cabal","CHROME_CRASHPAD_PIPE_NAME":"\\\\.\\pipe\\LOCAL\\crashpad_5552_YIJGHTNXKJXFXUKT","CMAKE_PREFIX_PATH":"\"C:/Program Files (x86)/Catch2/lib/cmake/Catch2/\"","COMPUTERNAME":"DESKTOP-50KS4PV","CUDA_PATH":"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6","CUDA_PATH_V11_6":"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6","ComSpec":"C:\\WINDOWS\\system32\\cmd.exe","CommonProgramFiles":"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramW6432":"C:\\Program Files\\Common Files","DriverData":"C:\\Windows\\System32\\Drivers\\DriverData","EFC_4988":"1","ELECTRON_RUN_AS_NODE":"1","FPS_BROWSER_APP_PROFILE_STRING":"Internet Explorer","FPS_BROWSER_USER_PROFILE_STRING":"Default","GHCUP_INSTALL_BASE_PREFIX":"C:\\","GHCUP_MSYS2":"C:\\msys64","GOPATH":"C:\\Users\\Gorun\\go","HOMEDRIVE":"C:","HOMEPATH":"\\Users\\Gorun","INTEL_DEV_REDIST":"C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\","LOCALAPPDATA":"C:\\Users\\Gorun\\AppData\\Local","LOGONSERVER":"\\\\DESKTOP-50KS4PV","MIC_LD_LIBRARY_PATH":"C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\compiler\\lib\\mic","NUMBER_OF_PROCESSORS":"16","NVTOOLSEXT_PATH":"C:\\Program Files\\NVIDIA Corporation\\NvToolsExt\\","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","OS":"Windows_NT","OneDrive":"C:\\Users\\Gorun\\OneDrive","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC","PROCESSOR_ARCHITECTURE":"AMD64","PROCESSOR_IDENTIFIER":"Intel64 Family 6 Model 141 Stepping 1, GenuineIntel","PROCESSOR_LEVEL":"6","PROCESSOR_REVISION":"8d01","PSModulePath":"C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules","PUBLIC":"C:\\Users\\Public","PYTHONPATH":"D:\\learning\\py_learning\\programming_python\\PP4E-Examples-1.4\\Examples","Path":"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6\\libnvvp;C:\\Program Files\\Common Files\\Oracle\\Java\\javapath;%JAVA_HOME%\\bin;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\intel64\\compiler;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Bandizip\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\pypy39;C:\\Python27\\Scripts;C:\\Users\\Gorun\\AppData\\Local\\Android\\Sdk\\platform-tools;C:\\Program Files (x86)\\NetSarang\\Xftp 7\\;C:\\Program Files (x86)\\NetSarang\\Xshell 7\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Microsoft\\Web Platform Installer\\;C:\\Program Files\\dotnet\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\ghcup\\ghc\\9.4.2\\bin;C:\\Users\\Gorun\\AppData\\Local\\SumatraPDF;D:\\utils\\ffmpeg\\bin;C:\\Program Files\\VideoLAN\\VLC\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\Neovim\\bin;D:\\utils\\neovide;D:\\utils\\git_proxy;C:\\Program Files\\NVIDIA Corporation\\Nsight Compute 2022.1.1\\;C:\\Program Files\\NVIDIA\\CUDNN\\v8.8\\bin;C:\\Program Files\\Go\\bin;C:\\Program Files\\CMake\\bin;C:\\Program Files\\LLVM\\bin;C:\\Program Files\\Docker\\Docker\\resources\\bin;C:\\Program Files\\nodejs\\;C:\\local\\vcpkg;C:\\local;C:\\Users\\Gorun\\AppData\\Local\\Programs\\Python\\Python310\\Scripts\\;C:\\Users\\Gorun\\AppData\\Local\\Programs\\Python\\Python310\\;C:\\Users\\Gorun\\.cargo\\bin;C:\\Users\\Gorun\\AppData\\Local\\Programs\\Python\\Python311\\Scripts\\;C:\\Users\\Gorun\\AppData\\Local\\Programs\\Python\\Python311\\;C:\\Users\\Gorun\\AppData\\Roaming\\local\\bin;C:\\Users\\Gorun\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Gorun\\AppData\\Local\\JetBrains\\Toolbox\\scripts;C:\\Users\\Gorun\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Gorun\\.dotnet\\tools;C:\\texlive\\2022\\bin\\win32;C:\\ghcup\\bin;C:\\Users\\Gorun\\go\\bin;C:\\Users\\Gorun\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\Gorun\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\bin;C:\\Users\\Gorun\\AppData\\Local\\gitkraken\\bin;C:\\Users\\Gorun\\AppData\\Roaming\\npm;C:\\mingw64\\bin;C:\\mingw64\\bin","ProgramData":"C:\\ProgramData","ProgramFiles":"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramW6432":"C:\\Program Files","SESSIONNAME":"Console","STACK_ROOT":"C:\\sr","SystemDrive":"C:","SystemRoot":"C:\\WINDOWS","TEMP":"C:\\Users\\Gorun\\AppData\\Local\\Temp","TMP":"C:\\Users\\Gorun\\AppData\\Local\\Temp","USERDOMAIN":"DESKTOP-50KS4PV","USERDOMAIN_ROAMINGPROFILE":"DESKTOP-50KS4PV","USERNAME":"Gorun","USERPROFILE":"C:\\Users\\Gorun","VBOX_MSI_INSTALL_PATH":"C:\\Program Files\\Oracle\\VirtualBox\\","VCPKG_ROOT":"C:\\local\\vcpkg","VS140COMNTOOLS":"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\","VSCODE_AMD_ENTRYPOINT":"vs/workbench/api/node/extensionHostProcess","VSCODE_CODE_CACHE_PATH":"C:\\Users\\Gorun\\AppData\\Roaming\\Code\\CachedData\\b3e4e68a0bc097f0ae7907b217c1119af9e03435","VSCODE_CRASH_REPORTER_PROCESS_TYPE":"extensionHost","VSCODE_CRASH_REPORTER_SANDBOXED_HINT":"1","VSCODE_CWD":"C:\\Users\\Gorun\\AppData\\Local\\Programs\\Microsoft VS Code","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_IPC_HOOK":"\\\\.\\pipe\\c77c08cee42252d02075dcc4fa2d3842-1.78.2-main-sock","VSCODE_NLS_CONFIG":"{\"locale\":\"en\",\"osLocale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}","VSCODE_PID":"5552","ZES_ENABLE_SYSMAN":"1","_NT_SYMBOL_PATH":"srv*c:\\symbols*http://msdl.microsoft.com/download/symbols;","windir":"C:\\WINDOWS","CMT_MINGW_PATH":"C:\\mingw64\\bin"}
[cmake] Not searching for unused variables given on the command line.
[extension] [8827] cmake.buildDirectory finished (returned "d:/learning/simple_test/build")
[extension] [7316] cmake.buildDirectory finished (returned "d:/learning/simple_test/build")
[cache] Reading CMake cache file d:/learning/simple_test/build/CMakeCache.txt
[cache] Cache file does not exist: Returning empty cache data
[cmake] -- The C compiler identification is GNU 13.1.0
[cmake] -- The CXX compiler identification is GNU 13.1.0
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] -- Check for working C compiler: C:/mingw64/bin/gcc.exe - skipped
[cmake] -- Detecting C compile features
[cmake] -- Detecting C compile features - done
[cmake] -- Detecting CXX compiler ABI info
[cmake] -- Detecting CXX compiler ABI info - done
[cmake] -- Check for working CXX compiler: C:/mingw64/bin/g++.exe - skipped
[cmake] -- Detecting CXX compile features
[cmake] -- Detecting CXX compile features - done
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: D:/learning/simple_test/build
[cmakefileapi-parser] Read reply folder: d:\learning\simple_test\build\.cmake\api\v1\reply
[cmakefileapi-parser] Found index files: ["cache-v2-033a306cabd23c2b47f2.json","cmakeFiles-v1-4eb099e048994993518f.json","codemodel-v2-e77017341a3fb0b30be8.json","directory-.-Debug-d0094a50bb2071803777.json","index-2023-05-30T15-05-45-0585.json","target-main-Debug-352f58fe881544a66f09.json","toolchains-v1-dfa3c03319a924172647.json"]
[cache] Reading CMake cache file d:/learning/simple_test/build/CMakeCache.txt
[cache] Parsing CMake cache string
[cache] Reading CMake cache file d:/learning/simple_test/build/CMakeCache.txt
[cache] Parsing CMake cache string
Additional Information
In fact, I found more bugs using this mingw GCC 13.1.0 in intellisense and currently find missing std::expected constructors bug.
This is not fully tested and maybe I should make another issue for the intellisense bug using mingw GCC 13.1.0.
Thanks for the report! We'll try to reproduce this issue and let you know if we have any questions.
I'm having the same issue, I am using MSYS2 mingw64 GCC 13.1.0, it does not get any output on the CMake/Launch Terminal. when running through the cmake tools debugger, "cout" gets a Seg fault!
@hund-gassi @DistinctWind I have just attempted to use your repro steps (using the provided main.cpp, CMakeLists.txt, and then using MSYS gcc 13.1) and I was not able to reproduce the issue.
Could you both attempt this scenario using the pre-release version of the extension? Currently, the pre-release version is v1.16.10. Thanks!
@hund-gassi @DistinctWind I have just attempted to use your repro steps (using the provided main.cpp, CMakeLists.txt, and then using MSYS gcc 13.1) and I was not able to reproduce the issue.
Could you both attempt this scenario using the pre-release version of the extension? Currently, the pre-release version is v1.16.10. Thanks!
The pre-release version solves the issue!
Below is my original comment before I tried the pre-release version.
Hi, I'm running into similar issue here.
My guess is that when using GCC 13.1.0 or higher to compile, the executable needs to load some dlls inside the mingw64/bin folder, which, if otherwise loaded from some other directories, could have some potential compatibility issues and cause the program to crash. When previously using GCC 12.2.0 to compile, the dlls needed from either the mingw64/bin folder or some other directories might be compatible and can be used interchangeably. So, what's going on here is probably that we are somehow using the dlls from some directory other than the mingw64/bin ones all the time but the problem didn't appear until we upgrade to the latest version of mingw.
It seems that vscode-cmake-tools doesn't set Path correctly in a CMake/Launch terminal. In my case, I have a simple hello.exe which simply includes <iostream> and prints out "hello". It needs libstdc++-6.dll to run, which exists both in my mingw64/bin folder and a Julia-1.8.3\bin folder. This is what causes the problem. hello.exe fails to run from the CMake/Launch terminal, which is created by vscode-cmake-tools plugin after setting the active kit to [Unspecified] and clicking the triangular "launch" button, but it runs perfectly from the terminal I started directly in VS Code. In the plugin-created terminal, the Julia-1.8.3\bin directory precedes the mingw64/bin directory in Path, so the executable is using libstdc++-6.dll provided by Julia. But probably because I'm compiling with a newer version of mingw, that .dll is not compatible with the executable. So, loading the .dll from mingw64/bin works fine, which is the case when executing from the terminal created directly in VS Code, where the mingw64/bin directory precedes the Julia-1.8.3\bin directory in Path - just like how I set them in Windows.
Also, if the active kit is set to [Unspecified], the terminal created doesn't seem to have the Path issue and works fine as well.
@Delay-n-days's comment solved my issue temporarily, but I don't have a clue how vscode-cmake-tools filters or sorts the directories in Path and this work around doesn't seem good enough, at least to me.
:tada: This issue has now been fixed and is now available in the latest release! :tada: