Originally Posted by
Codeplug
I just ran that and updated my MSYS environment to the latest. Then copied the code in post #1 into main.cpp. Then:
Code:
$ g++ -Wall -O0 -g3 main.cpp -lpthread
$ a.exe | tail
main.cpp:24
trial 96
main.cpp:24
trial 97
main.cpp:24
trial 98
main.cpp:24
trial 99
main.cpp:24
done!
Same result if I compile and run outside of MSYS - runs to 99 every time.
Do you have any other versions of MinGW installed that aren't in C:\MinGW?
Your PATH environment variable should have "C:\MinGW\Bin" at the front of the PATH string.
You may need to uninstall anything with "MinGW" in it from control panel. Then delete C:\MinGW completely (plus any other MinGW installs). Then re-install.
gg