I attempted to set up my environment for C++ development and follow the hands-on practice. However, when running a simple program that prints "Hello, world," I encountered the following output: "Segmentation fault." While debugging the code, it seems that the problem lies with the "libstdc++-6.dll" file. However, I'm not sure how to resolve this issue, and I'm also uncertain if it's a common problem. Can someone assist me?
I'm using Windows 11.
#include <iostream>
int main() {
std::cout << "Hello, world!" << std::endl;
return 0;
}
Prompt
$ g++ hello.cpp -o hello
$ ./hello
Segmentation fault