Configuring mingw32 and MSYS (Error executing binaries from /mingw/bin)

StackOverflow https://stackoverflow.com/questions/15110505

  •  15-03-2022
  •  | 
  •  

سؤال

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..

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top