🌐
Cplusplus
cplusplus.com › forum › windows › 282740
How can I install gdb using mingw-get? - C++ Forum
March 18, 2022 - Even the web-site http://mingw.org/ is down now. You really want to use the follow-up project Mingw-w64 these days! There are various ways to install Mingw-w64, but I highly recommend to go with MSYS2: https://www.msys2.org/ Once you have MSYS2, just type "pacman -S gdb" in order to install GDB.
🌐
Arch Linux
aur.archlinux.org › packages › mingw-w64-gdb
AUR (en) - mingw-w64-gdb
GDB does some things that don't really translate into a normal VT220-style terminal. Also, because of dependencies, you should have /usr/i686-w64-mingw32/bin in the PATH, try to make sure to do something like "WINEPATH=/usr/i686-w64-mingw32/bin wineconsole gdb ..."
Discussions

MinGW-w64, QTCreator and gdb installation with MSYS2. Compiler, debugger and IDE installation for programming in C and C++, 32 and 64-bit code.
I'll be completely honest, I am a relatively new C programmer and I program on Linux and abandoned the prospect of compiling stuff on Windows long ago because it looked like there were too many downsides and workarounds and the like, so I have no idea what is going on here, but it looks beautiful. More on reddit.com
🌐 r/C_Programming
23
23
May 17, 2018
Adding gdb to MinGW - Stack Overflow
I've gone to http://sourceforge.net/project/showfiles.php?group_id=2435, downloaded the Automated MinGW Installer for MinGW 5.1.4 and at the same time the GNU Source-Level Debugger Release Candidat... More on stackoverflow.com
🌐 stackoverflow.com
gdb not found when setting up Mingw-64w in VSCode - Stack Overflow
Following the documentation provided by VSCode for C++ provided on this link: https://code.visualstudio.com/docs/languages/cpp, I ran into trouble when checking the MinGW installation. When I ran g... More on stackoverflow.com
🌐 stackoverflow.com
[C++]What is the best way to learn to use GDB with MinGW G++?

I'll never understand these questions. gdb comes with an extensive manual that is very well written. (The pdf version is in many ways easier to read than HTML.) Why would that not be your default starting point?

More on reddit.com
🌐 r/learnprogramming
2
1
January 16, 2014
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360009731140-MinGW-w64-GDB-not-working
MinGW-w64 GDB not working – IDEs Support (IntelliJ Platform) | JetBrains
September 12, 2020 - I've done the following: installed MSYS2 using msys2-x86_64-20200903.exe, ran MSYS2, executed pacman -Syu, closed and reopened MSYS2, executed pacman -S mingw-w64-x86_64-toolchain (selected the default "all" option) and as a result compilers and gdb were installed in C:\msys64\mingw64\bin.
🌐
Ubuntu
launchpad.net › ubuntu › +source › gdb-mingw-w64
gdb-mingw-w64 package : Ubuntu
The following unsupported and untrusted Personal Archives (PPAs) provide packages of 'gdb-mingw-w64':
🌐
MSYS2
packages.msys2.org › packages › mingw-w64-x86_64-gdb-multiarch
Package: mingw-w64-x86_64-gdb-multiarch - MSYS2 Packages
mingw-w64-gdb · Description: GNU Debugger (supports all targets) Group(s): mingw-w64-x86_64-toolchain · Repo: mingw64 · Homepage: https://www.gnu.org/software/gdb/ License(s): GPL-3.0-or-later · Version: 16.3-1 · External: Anitya · gdb · Arch Linux · 16.3 · AUR ·
🌐
The Eclipse Foundation
eclipse.org › forums › index.php › t › 165647
Eclipse Community Forums: C / C++ IDE (CDT) » Debugging with minGW GDB | The Eclipse Foundation
The Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 350 open source projects, including runtimes, tools and frameworks.
🌐
Reddit
reddit.com › r/c_programming › mingw-w64, qtcreator and gdb installation with msys2. compiler, debugger and ide installation for programming in c and c++, 32 and 64-bit code.
r/C_Programming on Reddit: MinGW-w64, QTCreator and gdb installation with MSYS2. Compiler, debugger and IDE installation for programming in C and C++, 32 and 64-bit code.
May 17, 2018 -

Why MSYS2 and not just install QT from the official website? Because official QT installation on Windows only supports 32-bit code with GCC toolkit.



Everything below is highly recommended to launch with administrator privileges (right mouse click and Run as administrator).



Installation

1.. Download MSYS2 installer here: https://www.msys2.org/ . I recommend x86_64 version, it can work with both x86_64 and i686 code.


2.. Launch installation as administrator and install. Very straightforward installation, just follow it.


3.. After installation the command line window is launched. Wait until you see something like:

    admin@MyPC MSYS ~
    $

If that window is not launched automatically, launch it manually at Start>Programs>MSYS2 64bit>MSYS2 MSYS (launch it as administrator). We have installed MSYS2 on our system.


4.. Now we need to update it. To update it run pacman -Syuu. Currently, there is a bug, you will see:

:: msys2-runtime and catgets are in conflict. Remove catgets? [y/N]

and after also:

:: msys2-runtime and libcatgets are in conflict. Remove libcatgets? [y/N]

on both questions answer y. If you are interested in more information about this issue look here: https://stackoverflow.com/questions/50547051/how-to-resolve-conflict-after-installing-msys2-and-running-pacman-syuu

There can be other questions too but nothing difficult.


5.. If you see:

warning: terminate MSYS2 without returning to shell and check for updates again
warning: for example close your terminal window instead of calling exit

Now just close command line window. Window may freeze but it is not a problem. Also you can get a window that says:

Processes are running in session: 
Close anyway?

press OK. The window may freeze again, just try to close. If there is a window that says Terminal is not responding choose Close the window. If there is a window that asks to terminate the process then terminate it. You can also get some warnings and errors but don't worry, just close these windows.


6.. If you did step 5, launch Start>Programs>MSYS2 64bit as administrator. If there was no step 5 for you just keep working in command line window that is open. Repeat step 4 of this tutorial until you see:

$ pacman -Syuu
:: Synchronizing package databases...
 mingw32 is up to date
 mingw64 is up to date
 msys is up to date
:: Starting core system upgrade...
 there is nothing to do
:: Starting full system upgrade...
 there is nothing to do

MSYS2 is now installed and fully updated.


7.. Now we need to install mingw-w64, QT Creator, and gdb. To do that run command:

pacman -S mingw-w64-i686-qt mingw-w64-i686-qt-creator mingw-w64-x86_64-qt mingw-w64-x86_64-qt-creator mingw-w64-i686-gdb mingw-w64-x86_64-gdb

You will be asked which qt version to install, static or non-static.

From: https://softwareengineering.stackexchange.com/a/47339

This only applies if your app is closed source.

Can I use an LGPL-licenced library in my commercial app?

In short: yes you can. But one important thing to take care of is that the GNU LGPL covered library is dynamically linked, not statically mixed with the main application.

It should also be possible to exchange that dynamically linked library for an independently compiled build. Otherwise you have likely intertwingled the library and main application code.

Also, I asked that question on IRC and got the answer:

<vasili111> @Diablo-D3 What about qt version for me? Should I peak static or non-static?
<Diablo-D3> depends entirely on what you want to build
<vasili111> pick*
<Diablo-D3> do you want to build an exe that doesnt require the qt dlls to go with it? then static
<Diablo-D3> for dicking around, it doesnt matter which you get
<vasili111> So if I want simple programs (hello world and etc) that are single exe files I need to go with static version?
<Diablo-D3> yeah

So if you plan to make open source software it does not matter which one you choose. If closed source, choose non-static. I personally choose static version.

Other questions of the installer are easy and answer them appropriately. Installation can take 20-30 mins or even more.


8.. Now and from time to time repeat only steps 4 until you see what is in step 6 and if appears what is in step 5 do as described. After close command line window.


9.. Read "Some problems and solutions you may see" section before!

a. To launch QT Creator to work with 32 bit code:

launch Start>Programs>MSYS2 64bit>MSYS2 MinGW 32-bit with administrator privileges and wait until you see something like:

admin@MyPC MINGW32 ~
$

b. To launch QT Creator to work with 64 bit code:

launch Start>Programs>MSYS2 64bit>MSYS2 MinGW 64-bit with administrator privileges and wait until you see something like:

admin@MyPC MINGW64 ~
$

Now type qtcreator and press enter. QT creator will launch.


10.. Do step 9 to launch QT Creator everytime you need it. Enjoy!



Uninstallation

If you decide to uninstall MSYS2, uninstall it as any other software from Control Panel>Programs and Features. Also if left manually delete msys64 folder (usually it is located at c:\msys64).

If you run uninstall and MSYS2 does not disapears from the installed programs list and/or you get an error window:

An error occurred while trying to uninstall MSYS2 64bit. It may have already been uninstalled.
Would you like to remove MSYS2 64bit from the Programs and Features list?

screenshot:

https://i.stack.imgur.com/eOB63.png

Choose Yes. Also if left manually delete msys64 folder (usually it is located at c:\msys64). More about that issue here: https://stackoverflow.com/questions/50545907/how-to-uninstall-msys2



Some problems and solutions you may see

1.. If you create in 32bit QT Creator a project, select 32-bit MinGW kit. If you create in 64bit QT Creator a project, select 64-bit MinGW kit. Otherwise, you can get this issue: https://stackoverflow.com/questions/50570339/error-with-debugging-in-qt-creator-with-dgb-because-of-unknown-signal

2.. It is possible that, in MinGW-w64 32 bit kit by default debugger is set gdp 64 bit which will cause an error when debugging 32 bit code. Check it here in QT creator Tools > Options > Build and Run > Kits https://i.stack.imgur.com/lxcLz.png . You can not change gdp in kit that is installed with the installation. Instead, clone existing 32 bit kit and change gdp 64 bit to gdp 32 bit in cloned kit. Use that clonned kit when creating project for 32 bit code. Some links about that issue: https://stackoverflow.com/questions/50593191/how-to-change-debugger-in-qt-creator and https://github.com/Alexpux/MINGW-packages/issues/3883


Some tips, tricks and other useful info:

To see installed packages: https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#List_of_installed_packages

To search for avaliable package(s): pacman -Ss name_of_package

Other packman commands: https://wiki.archlinux.org/index.php/pacman

Most complete documentation of MSYS2: https://github.com/msys2/msys2/wiki


Some other useful links:

https://stackoverflow.com/questions/30069830/how-to-install-mingw-w64-and-msys2

https://stackoverflow.com/questions/38335424/how-to-use-mingw-64-with-qt-creator/38337759#38337759

https://github.com/msys2/msys2/wiki/MSYS2-installation

Adding clang: https://stackoverflow.com/a/49418743/1601703


I know that my text formatting is not the best also there will be some grammar mistakes. I will appreciate if you correct them both and write result me in PM


Thanks everyone who helped me with dealing setting up everything: OldWolf2, Diablo-D3, jedwardsol, Martchus, Kelteseth, and others from reddit, stackoverflow and IRC.

Find elsewhere
🌐
WinLibs
winlibs.com
WinLibs - GCC+MinGW-w64 compiler for Windows
Click Create Config and enter a name (e.g. Debug_MINGW32 for 32-bit (i686) or Debug_MINGW64 for 64-bit (x86_64)) ... Set the location of bin\gdb.exe under the mingw32 or mingw64 folder from the extracted download (you can also browse to it by clicking on the ...
🌐
Sparx Systems
sparxsystems.com › forums › smf › index.php
Debug with MinGW GDB
Debug with MinGW GDB · « previous next » · Print · Pages: [1] Print · Pages: [1] « previous next » · Sparx Systems Forum » · Enterprise Architect » · General Board » · Debug with MinGW GDB · X · stay in touch · Products · Products · Enterprise Architect ·
🌐
MSYS2
packages.msys2.org › packages › mingw-w64-x86_64-gdb
Package: mingw-w64-x86_64-gdb - MSYS2 Packages
mingw-w64-gdb · Description: GNU Debugger (mingw-w64) Group(s): mingw-w64-x86_64-toolchain · Repo: mingw64 · Homepage: https://www.gnu.org/software/gdb/ License(s): GPL-3.0-or-later · Version: 16.3-1 · External: Anitya · gdb · Arch Linux · 16.3 · AUR ·
🌐
Visual Studio Code
code.visualstudio.com › docs › cpp › config-mingw
Using GCC with MinGW
November 3, 2021 - In this tutorial, you configure Visual Studio Code to use the GCC C++ compiler (g++) and GDB debugger from mingw-w64 to create programs that run on Windows.
🌐
SourceForge
sourceforge.net › home › open source software › software development › compilers › mingw-w64 - for 32 and 64 bit windows › files
MinGW-w64 - for 32 and 64 bit Windows Files
Download Latest Version mingw-w64-v11.0.0.zip (16.8 MB) Home / External binary packages (Win64 hosted) / gdb · Try checking the most updated listing Source: README.rst, updated 2024-09-09 · nel_h2 · Enterprise-grade ITSM, for every business · Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity.
🌐
mingw-w64
mingw-w64.org › downloads
Pre-built Toolchains - mingw-w64
mingw-w64 GCC : compilers, linker, assembler · GDB : debugger · GNU Make : standard build tool · busybox-w32 : standard unix utilities, including sh · Vim : powerful text editor · Universal Ctags : source navigation · The toolchain includes pthreads, C++11 threads, and OpenMP.
🌐
OGG
rpg.hamsterrepublic.com › ohrrpgce › GDB_on_Windows
GDB on Windows
June 18, 2017 - If you are using Linux, you probably already have gdb, but if you are using Windows, you will need to install it. MinGW distributes a Windows version of gdb. You can get the latest mingw installer here which can in turn install gdb. After installing MinGW, run the "MinGW Installation Manager" ...
Top answer
1 of 3
4
  1. Make sure you have followed the MinGW installation as in https://www.msys2.org/ or if you were using installer from link to installer to install MYSYS then you have to continue from step 5 to install required compiler tools use following command insted of step 6 command

pacman -S --needed base-devel mingw-w64-x86_64-toolchain

  1. You should add the same Installation Folder used in step 3 of installation instruction to the system PATH variable or if you have used installer to install the MinGW find the MinGW installation directory by opening your C drive and add that path to system PATH (in my case Ex: C:\msys64\mingw64\bin)

  2. Make sure the C:\msys64\mingw64\bin is not empty, if it's empty mostly you haven't continued from the step 5 after installing MYSYS from installer

  3. After adding system PATH, close and open cmd window just type path in cmd and enter to make sure your MinGW path is addedd to system PATH, (you can copy paste the output to notepad/notepad++ and search MinGW to find the path)

  4. Once MinGW is in the path your gdb command should work (please provide this screenshot of path command output, if it's still didn't work)

2 of 3
1

If you install according to https://code.visualstudio.com/docs/cpp/config-mingw, MSYS2.exe direct install.

  1. check if your path: \msys64\mingw64\bin is empty? if it is empty, it shows the gdb is missing. Follow my step 2

  2. open this website, https://packages.msys2.org/packages/mingw-w64-x86_64-gdb, copy the installation comman: pacman -S mingw-w64-x86_64-gdb

  3. open the MSYS2 installed in your computer, past: pacman -S mingw-w64-x86_64-gdb, the comman you copied in step 2.

    if you see the path: \msys64\mingw64\bin is filled with files. You're successeful. Open a cmd window, and input: gbd --version.

🌐
VisualGDB
visualgdb.com › w › tutorials › category › tutorials › win32 › mingw
MinGW – VisualGDB Tutorials
This tutorial shows how to build and debug a simple MinGW-based application using VisualGDB.
🌐
Code::Blocks
forums.codeblocks.org › index.php
Adding GDB to MinGW
Adding GDB to MinGW · « previous next » · Send this topic · Print · Pages: [1] Go Down · Send this topic · Print · Pages: [1] Go Up · « previous next » · Code::Blocks Forums » · User forums » · Help » · Adding GDB to MinGW · XHTML · RSS ·