Compiling 64-bit GSL on Cygwin using 64-bit GCC

2019-08-12 22:22发布

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.

标签: c gcc cygwin gsl
1条回答
孤傲高冷的网名
2楼-- · 2019-08-12 22:44

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.

查看更多
登录 后发表回答