Question

When trying to build I get this error:

$ make CC=i686-w64-mingw32-gcc
  CC    aes.c
i686-w64-mingw32-gcc: error trying to exec 'as': execvp: No such file or directory
Was it helpful?

Solution

Set PATH to /usr/bin instead of /bin

There is a known caveat where calling the compiler directly as /bin/x86_64-w64-mingw32-gcc will fail, use /usr/bin/x86_64-w64-mingw32-gcc instead and make sure that your PATH variable has /usr/bin before /bin.

mingw-w64.sourceforge.net

This is caused by a mounting problem. On linux you have /bin and /usr/bin, no big deal. On Cygwin you have C:\cygwin\bin. Then mount points are set like this.

C:\cygwin\bin on /usr/bin
C:\cygwin on /

So technically you could represent C:\cygwin\bin with /bin or /usr/bin, although as stated above the former will not work.

OTHER TIPS

You probably miss g++ for mingw.

Try this:

sudo apt install g++-mingw-w64-i686

After that either i686-w64-mingw32-gcc or i686-w64-mingw32-g++ will compile your sources.

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