-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Using GCC with MinGW Tutorial from https://code.visualstudio.com/docs/cpp/config-mingw #13519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not sure exactly where it went wrong, but here are some possibilities:
If none of those ideas resolve the problem, can you share the contents of any |
Hi @bobbrow Thanks for those recommodations. When i start the "run" i get the correct "C:\msys64\ucrt64\bin\g++.exe" to choose from. The tasks.json is as follow: I tried also the same for a only C - Code. However when i try to take another C++, similar Code i get a segmentation fault: |
When you compile the C++ file into helloworld.exe, are you able to run it without the debugger? For example, open the Terminal window and run If that's not working, let's try compiling and running the file yourself in the Terminal and see if that works:
|
When i insert some c printf into a cpp file i can ran it with the debugger.. I think there is something wrong with the c++ "solver" or however it is called, because as soon as i try to run c++ it doesn't do what its meant to.. |
Something may have gone wrong with your MinGW installation. I believe I have the same version as you and these commands work for me. I'm not an expert at troubleshooting issues with the toolset itself, so my best recommendation at this point is to try uninstalling and reinstalling the package. If that doesn't work, consider uninstalling all of Msys2 and retrying from the beginning. |
Hallo
I tried to run the Totorial as on the Website.
I wonder if anyone can tell me what went wrong.
When i try to ran the "helloworld.cpp" it kind of does something but the predicted Output "Hello C++ ..." does not come out.
I get instead:
PS D:\VSCodeCTest\helloworld> & 'c:\Users\werme.vscode\extensions\ms-vscode.cpptools-1.24.5-win32-x64\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-pwvtuybk.efh' '--stdout=Microsoft-MIEngine-Out-fxxwglkc.ecy' '--stderr=Microsoft-MIEngine-Error-i0j22iyb.xlm' '--pid=Microsoft-MIEngine-Pid-c0kdexmb.aht' '--dbgExe=C:\msys64\ucrt64\bin\gdb.exe' '--interpreter=mi'
Also the Debuger does not start. There i get in the debugconsole:
=thread-group-added,id="i1"
GNU gdb (GDB) 15.2
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
https://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"
[New Thread 9748.0x4fe0]
[New Thread 9748.0xc58]
[New Thread 9748.0x708]
[Thread 9748.0xc58 exited with code 3221225785]
[Thread 9748.0x708 exited with code 3221225785]
[Thread 9748.0x4fe0 exited with code 3221225785]
ERROR: Unable to start debugging. Unexpected GDB output from command "-exec-run". During startup program exited with code 0xc0000139.
The program 'D:\VSCodeCTest\helloworld\helloworld.exe' has exited with code 0 (0x00000000).
Where the Terminal says:
PS D:\VSCodeCTest\helloworld> & 'c:\Users\werme.vscode\extensions\ms-vscode.cpptools-1.24.5-win32-x64\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-rtvx0ij4.whs' '--stdout=Microsoft-MIEngine-Out-20o5sims.3o2' '--stderr=Microsoft-MIEngine-Error-r55slmkn.ma3' '--pid=Microsoft-MIEngine-Pid-an52j2dy.zxc' '--dbgExe=C:\msys64\ucrt64\bin\gdb.exe' '--interpreter=mi'
The text was updated successfully, but these errors were encountered: