This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Install Plink In Cygwin

Can I install PLINK in cygwin? Need steps if so.

Thanks.

plink genetics

You need to follow the instructions that David linked to, then if something does not work and you have specific questions you can ask those.

2 answers

Download the source code. Unzip it. Follow the instructions in README.TXT:

COMPILATION: You will need a standard C/C++ compiler such as GNU gcc (version 3). This is likely available on all Linux/Unix platforms. For MS-DOS, DJGPP or MinGW are appropriate choices. To help compiling, see documentation (basically, just be sure to select the correct Makefile and type make -f Makefile.*)

That ought to work.

Need more advice. I have Visual Studio 2010, can I use it to compile it? I want to use plink in cygwin rather than dos/windows. What is the proper path(/usr/local/bin/)??? Because I downloaded it to c drive.

gcc is included in Cygwin (or at least installable through the menu) - you just need to follow the instructions

Just downloaded a bunch of code and compiled them. Errors: zstream something... My laptop is windows 7 64 bit. There are two versions of plink: Linux (x86_64) and Linux (i686). Which one should I select? By the way, dos version plink works greatly so far.

Please update your question with what exactly you did. Otherwise noone will be able to help you (x86_64 is 64 bit but the source does not have an archtitecture).

I just figured out how to do this myself: these are the snags a ran into with compiling and how I solved them. I am on windows 7 64bit machine with the latest cygwin standard installation.

  1. you need to edit the makefile so the options are like this:

    Set this variable to either UNIX, MAC or WIN

    SYS = UNIX

    Leave blank after "=" to disable; put "= 1" to enable

    WITHRPLUGINS = WITHWEBCHECK = FORCE32BIT = 1 WITHZLIB = WITHLAPACK = FORCE_DYNAMIC =

  2. compiler for me threw an error because the source code uses a function call to "fopen64" in c++, which wasn't recognized by the compiler (gcc 4.3.4) so just did a find replace like so:

    sed -i *.cpp s/fopen64/fopen/g

  3. compiler then threw another error "ld: cannot find -lgcc_s", which i guess is a known bug which you can read about here: http://cygwin.com/ml/cygwin/2007-06/msg00332.html i fixed this by adding the flag -static-libgcc in the section of the makefile where you can add additional flags to the compiler

    Any other compiler flags here ( -Wall, -g, etc)

    CXXFLAGS = -static-libgcc

then it compiled just fine!

hope this helps someone..

Log in to answer this question.