If you want to develop cross-platform programs using C++ and your OS is Windows, and you want to use VSCode as your IDE, you should follow the instructions found at this page: https://stackoverflow.com/questions/30069830/how-can-i-install-mingw-w64-and-msys2
follow the answer written by HolyBlackCat
I learned that you can set up VSCode to develop using the C++ STL (Standard Library) no worries, just download and install mingw from winlibs or somewhere else and the ninstall C/C++ Extension Pack in VSCode and it will pretty much work and compile your project with little fuss.
However the moment you want to start including 3rd party C++ libraries (I wanted to try using poppler in my project) the whole situation becomes painful and impossible.
To use poppler, you will also need a number of other 3rd party libraries and to go downloading all of those and building them is a painful task, especially when all you wanna do is: #include "poppler-document.h" and keep coding your own project.
So instead you are better off installing MSYS2 first, and then install mingw THROUGH MSYS2 using pacman and you will be able to use pacman to install the 3rd party C++ libraries as you need them and have them available in your C++ development environment which VCode will hook into.
At least, hopefully that's how it will work..... I'll get back to you Barry.
---
And we're back. You should also consider following the instructions on this page: https://code.visualstudio.com/docs/cpp/config-mingw and check in a Windows cmd windows that gcc, g++ AND gdb are available on the command line (add the msys2 ucrt64 bin folder to your computer's PATH environment variable)
If gdb is not found, you need to do this command in msys2 ucrt64 terminal:
pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain
Comments are not available for this entry.

Categories



