I want to compile Corkscrew. However I am not very familiar with Unix environments.
Here are the things I have tried and how I failed.
Step 1 : I installed Cygwin and from the Cygwin Terminal (mintty.exe), I tried to invoke ./configure in the Corkscrew source directory, as instructed in the README file.
This action produced the following error message:
checking whether the C compiler (gcc ) works... no
On further investigation, typing gcc in Cygwin Terminal produced :
-bash: gcc: command not found
Step 2 : I therefore downloaded Mingw32. There is now on my PC this file
C:\MinGW\bin\mingw32-gcc
I want Cygwin to be able to use this file as a gcc version.
Step 3 : I created a link under Cygwin (inspired by a different this article where a similar action is done for make).
cd /bin
ln -s /cygdrive/c/mingw/bin/mingw32-gcc.exe gcc.exe
However the instruction ./configure still produce the same error. The config.log teaches me that :
configure:912: gcc -o conftest conftest.c 1>&5
configure: failed program was:
#line 907 "configure"
#include "confdefs.h"
main(){return(0);}
Step 4 : I momentarily give up trying to use Cygwin Terminal and switches to MinGW Shell. This time the ./configure command seems to be successful !
Step 5 : In MinGW Shell, I enter the make
command. It returns the following error message :
gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -g -O2 -c corkscrew.c
corkscrew.c:2:23: fatal error: arpa/inet.h: No such file or directory
compilation terminated.
make: *** [corkscrew.o] Error 1
After a few searches I find more information in this stackoverflow question, where the first answer suggest to "go with Cygwin, which provides a POSIX compatibility wrapper on Windows."
Therefore it seems I have to stick to Cygwin. Thus my question : how do I get Cygwin to compile this program ?
Note : I think I need to give access to Cygwin to all the programs included in MinGW32, however adding the "C:\MinGW\bin\mingw32-gcc" string to my computer's PATH environment variable did not produce positive results.