X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: RE: 1.5.23: Program with GSL does not compile Date: Mon, 15 Jan 2007 19:23:24 -0000 Message-ID: <027e01c738da$a0548c70$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <45ABD396.3070401@uos.de> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On 15 January 2007 19:19, Nils Kehrein wrote: > Hi, > > I am trying to compile a C++ program which uses GSL, but it fails > for some odd reason. It goes like > > $ g++ -Wall `gsl-config --cflags` `gsl-config --libs` test_gsl.cpp > > ~~ >8 ~~ > /path/to/Temp/ccQ03psi.o:test_gsl.cpp:(.text+0x29): undefined reference > to `_gsl_matrix_alloc' > collect2: ld returned 1 exit status > ~~ 8< ~~ > > Which makes no sense at all because i tested it on a native Linux > machine and it compiled well. A side-effect of dynamic linking using .so shared objects. Try putting your source file earlier on the commandline and the libraries later. cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/