Question

I have installed MSYS, and have configured the path to /mingw/bin directory. But when i execute the gcc, g++ or any command in /mingw/bin folder is gives me the following error..

$ ./x86_64-w64-mingw32-g++
  ./x86_64-w64-mingw32-g++: ./x86_64-w64-mingw32-g++: cannot execute binary file

I have used mingw-w64-bin_x86_64-linux_20121031.tar.bz2 file, and extracted it using WinRar utility..

Was it helpful?

Solution

Usually, when you encounter cannot execute binary file it's because the exe can't run on your system. Assuming you are on windows, maybe it's because you are using a wrong package of MSYS (and the linux in the tar file seams odd...). Try to get a executable package of MinGW like here and install all the components you want in it. You can follow the tutorial here.

Edited as the right answer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top