X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:message-id:from:to:subject:content-type :mime-version; q=dns; s=default; b=scRqGOGzNHb6bGM85wJC3r/fPC5G6 SoiQYmdv58q11WoH0Af2D/7tPfGP9xhWHCt3CfewNA23NdN1jWPm8M/c+bCw6C1O VtUExE8f+YZsR6j1v11fdpefzq3faGndFGVJiGRG3P/VUVRK3RcqjTp7TgSck0il Z+b6YcvPgUFm/c= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:message-id:from:to:subject:content-type :mime-version; s=default; bh=e7vNQghIoEx6hVvQePlfxe0PaY4=; b=SA6 Y4V8ItuDIOaqA2Sq37sVdImmRflgj4APoAFnod39JAyS9C5tzQcngwSOAhgrMG8k 168tQMHu0ZjwXIldkdJqLWBDeQjTt0k4wE+YXt1Yw5TjVgS//T29ROvxLUMFeUXa vhQmQ7LCZR5HYohM7kzHERrV4nAB32CgRwnmdTcs= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50,SPF_PASS autolearn=ham version=3.3.2 X-HELO: smtp-rs1-vallila2.fe.helsinki.fi Date: Fri, 18 Oct 2013 00:02:38 +0300 Message-ID: <20131018000238.Horde.UZElabVgHsspuAWl7bQU_w7.jzlehtol@webmail.helsinki.fi> From: Susi Lehtola To: cygwin AT cygwin DOT com Subject: Linking to static libraries, e.g. gsl and hdf5 User-Agent: Internet Messaging Program (IMP) H5 (6.0.4) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline X-IsSubscribed: yes Hi, it seems that linking to some static libraries has broken down since the last time I tried to recompile my project (in April). Now the linking commands fail, e.g. /usr/bin/g++.exe -Wall -O2 -funroll-loops -mtune=generic -msse2 -static -fopenmp program.cpp -lgsl -lgslcblas -llapack -lblas -lgfortran results in /usr/lib/gcc/i686-pc-cygwin/4.7.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lgsl /usr/lib/gcc/i686-pc-cygwin/4.7.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lgslcblas I also get the same error when linking to -lhdf5. Having had a look at /usr/lib, I noticed that a lot of the libraries follow the *nix convention of the static libraries being named libfoo.a, while others have names of the type libfoo.dll.a. Indeed, the latter was true for the GSL and the HDF5 libraries, and symlinking /usr/lib/libgsl.a -> /usr/lib/libgsl.dll.a /usr/lib/libgslcblas.a -> /usr/lib/libgslcblas.dll.a /usr/lib/libhdf5.a -> /usr/lib/libhdf5.dll.a solved the problem. Why is this not done in the gsl and hdf5 packages? Other packages might also be affected. -- Susi Lehtola susi DOT lehtola AT iki DOT fi -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple