Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C compiler cannot create executables - Cygwin/MiniGW

I'm trying to compile Pyaudio, (a Python module) from source, since I'm using Windows, and only 32-bit binaries are available - I need 64. Following these instructions I downloaded Cygwin, and installed every component, to be safe. Installing Portaudio, another module, is required first.

When I run CFLAGS="-mno-cygwin" LDFLAGS="-mno-cygwin" ./configure, I get the error configure: error: C compiler cannot create executables. See 'config.log' for more details. config.log has an additional line below that message: gcc: The -mno-cygwin flag has been removed; use a mingw-targeted cross-compiler.

This leads me to believe that perhaps Cygwin is using the wrong compiler; the instructions are for using MinGw with Cygwin, but I never specified minigw in the process. I also wonder if there's something in the PyAudio build files that needs to be changed for 64-bit. I know nothing about C, compiling, Cygwin or MinGW, and am new to programming in general. Any ideas? Any other information I can provide?

like image 814
Turtles Are Cute Avatar asked Jun 20 '13 14:06

Turtles Are Cute


People also ask

Can MinGW and Cygwin coexist?

Operation Modes. The MSYS2 and CYGWIN can be used with different operation modes: You can use them together with MinGW to build Windows-native software. You can use them together with any other compiler to build Windows-native software, even with Visual Studio.

Does Cygwin have a C++ compiler?

description: The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, and Go, as well as libraries for these languages (libstdc++, libgcj,...).

What is MinGW and Cygwin?

Cygwin uses a DLL, cygwin. dll, (or maybe a set of DLLs) to provide a POSIX-like runtime on Windows. MinGW compiles to a native Win32 application. If you build something with Cygwin, any system you install it to will also need the Cygwin DLL(s). A MinGW application does not need any special runtime.


1 Answers

Current versions of Cygwin gcc do not support -mno-cygwin anymore because it never really worked correctly. Instead, you should use a proper cross-compiler, which is provided by the mingw64-i686-gcc packages, then run ./configure --host=i686-w64-mingw32.

like image 115
Yaakov Avatar answered Sep 28 '22 00:09

Yaakov