1

I am trying to compile 64-bit GSL on a Windows 7 machine. Here are the steps I took:

  1. Downloaded and untarred the GSL 1.15 source found here.

  2. Tested that I have a 64-bit version of GCC available in the Cygwin shell, by compiling the minimal program

    // simple.C
    
    int main() {
        ;
        return 0;
    }
    

    using

    x86_64-w64-mingw32-gcc -m64 simple.C -o simple
    
  3. In the untarred folder, I would like to pass the x86_64-w64-mingw32-gcc compiler to ./configure but am not sure how. I took a look at the configure file, but that is huge and appears to have been generated using autoconf.

awesoon
  • 32,469
  • 11
  • 74
  • 99
tchakravarty
  • 10,736
  • 12
  • 72
  • 116

1 Answers1

2

At the cygwin prompt you can use:

CC=x86_64-w64-mingw32-gcc CFLAGS=-m64 ./configure 

and configure will pick it up.

Important Note:

I am surprised that you don't have a wrapper gcc ... Why don't you try using ./configure by itself just as is to begin with and see what it does before overriding the C compiler as I showed.

Ahmed Masud
  • 21,655
  • 3
  • 33
  • 58
  • Thanks Ahmed, I did try compiling but that gave me a `checking whether the C compiler (gcc ) works... no` error. Your solution appears to be working, thanks. – tchakravarty Jun 07 '13 at 06:01
  • Would you happen to know why if I specify the `CFLAGS=-m64 -arch x86_64"` the compilation fails with a `C compiler can't create executables` error. – tchakravarty Jun 07 '13 at 06:12
  • you don't need to specify -arch x86_64; look in config.log and search for the phrase "C compiler can't create executables" and you'll find the exact reason – Ahmed Masud Jun 07 '13 at 09:09