1,104 questions
3
votes
1
answer
143
views
Visual Studio Code not recognizing std::cout
In Visual Studio Code, I get the following errors while using the following code.
#include <iostream> // Included header iostream is not used directly (fix available)clangdunused-includes
int ...
Advice
0
votes
7
replies
149
views
Problem with the first C++ code and installation of MinGW-w64 toolchain
I was trying to learn C++ programming using VS Code, but I ran into the following problem. When I launched the program from the official VS Code website, I got the error shown in the screenshot. Exit ...
1
vote
0
answers
114
views
Unable to build a simple C++ example on Windows - cmake, ninja, vscode CMakeTools extension
I would like compile a simple example using Clang, CMake, and Ninja on Windows in order to closely match a Linux C++ build setup. I have installed the tools using msys2. However, when I run "...
0
votes
1
answer
74
views
cmake version 4.2.3 is no longer linking properly
My build used to work until a recent update of MSys2. cmake (4.2.3) and gcc (version 15.2.0) were updated, and my build no longer works.
It appears that cmake is appending a .lib to some of the ...
3
votes
0
answers
106
views
MSYS2 -mcmodel=large and exceptions
Code:
#include <iostream>
#include <exception>
#include <stdexcept>
int main()
{
std::cout << "HW\n";
try {
std::cout << "Block\n";
...
3
votes
0
answers
121
views
How to use Zig with msys2 mingw
I tried to use Zig with MSYS2, but I failed. I passed the libc.txt to the compiler, but the compiler tells me it can't find the library. Is my libc.txt wrong?
I checked that my packages are the newest,...
0
votes
0
answers
31
views
Fewer entries in PATH variable when running a cmd command in MSYS2
When I run cmd //C 'echo %PATH%' in an MSYS2 terminal I expect the same output as when I run echo %PATH% in a Windows command prompt. However, the first command shows fewer entries. How come? I'm not ...
Tooling
0
votes
2
replies
51
views
Tmux History Menu
I use tmux for development. When I press "ctrl + r" on Windows in MSYS2 tmux, I see something like this:
USERNAME@DESKTOP UCRT64 /c/Users/USERNAME/Projects/BLAH/External/SUBMODULE/tests (...
1
vote
1
answer
144
views
building boost with b2 on windows msys2 ucrt64 clang produces windows/visual c++ style binaries rather than posix style ones
I'm trying to build boost on windows (currently windows 10 because my pc sadly doesn't have the tpm) with clang from msys2/mingw64/ucrt. To be clear, I have these infos from my current clang:
clang++ -...
1
vote
1
answer
206
views
Import .pyd Python module
I realized a C++ project and I used pydbind11. All work fine on Linux (C++ compilation with CMake produces test executables and Python module that works when I import it, installation with pip install ...
0
votes
0
answers
145
views
Waf cannot find the Boost libraries on MSYS2?
On a fresh install of MSYS2, I got into problems with a waf install of Ardour, the digital audio workstation, partly following this recipe. My approach was:
Install MSYS2 using the installer from ...
1
vote
1
answer
80
views
Msys2 open a terminal from a python script with given rows and columns
I am using MSYS2 and using a python script invoked from the command line in a bash terminal to open an other terminal with given rows and columns.
Here's what I got so far:
cmd = 'C:/...
1
vote
1
answer
306
views
MSYS2/UCRT64 compiled executable does not output to stdout/stderr in powershell/cmd
I'm attempting to compile and run a simple C++ executable that uses the QT library, under Visual Studio Code.
The program is simple, just outputting the working directory:
#include <QtCore/QDir>
...
2
votes
1
answer
100
views
Setting system path environment for GSL in Windows
I'm trying to use pip to install a github repo on Windows but the installation says that a src file is throwing a fatal error because it can't include the file 'gsl/gsl_randist.h'.
I have gsl ...
2
votes
1
answer
382
views
Why UTF8 is not working with MSYS2 Mingw64 UCRT compiler?
I see in multiple places things like that:
UCRT (ucrtbase.dll): Supports UTF-8 in paths, if you enable a UTF-8
locale in your application.
here and here.
I tested with this:
#include <stdio.h>
...