From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5700 invoked by alias); 14 May 2002 10:28:56 -0000 Mailing-List: contact gsl-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sources.redhat.com Received: (qmail 5663 invoked from network); 14 May 2002 10:28:48 -0000 Received: from unknown (HELO Octopussy.MI.Uni-Koeln.DE) (134.95.166.20) by sources.redhat.com with SMTP; 14 May 2002 10:28:48 -0000 Received: from uni-koeln.de (Octopussy [134.95.166.20]) by Octopussy.MI.Uni-Koeln.DE (8.9.1/8.9.1) with ESMTP id MAA13953; Tue, 14 May 2002 12:28:40 +0200 (MET DST) Message-ID: <3CE0E44D.21DBDD0D@uni-koeln.de> Date: Tue, 14 May 2002 03:39:00 -0000 From: Achim Gaedke X-Accept-Language: de-DE, en MIME-Version: 1.0 To: crsccw@nus.edu.sg CC: gsl-discuss@sources.redhat.com Subject: Re: problem in linking the lib References: <200205140905.g4E95Boo001922@leonis.nus.edu.sg> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-q2/txt/msg00164.txt.bz2 Message-ID: <20020514033900.3eA8vN9lTV3FM8YMncaPkC5U76oUQGBsZJdCyQfCrsg@z> Hmm... Maybe it is a typo: the gcc command must be: gcc -L/usr/lib -lgsl test.c Please note the space between the option -L/usr/lib (extends the library searchpath) and the option -lgsl (command to link against gsl library). Achim Chang Chew Wai schrieb: > > Dear sir, i think i need some help with gsl. i installed the rpm for > gsl-1.1.1-0. and was unable to link it to the lib. > > i tried to compile with the following command. > gcc -L/usr/lib-lgsl test.c > > the error messages are > /tmp/ccrOm9yz.o: In function `main': > /tmp/ccrOm9yz.o(.text+0x24): undefined reference to `gsl_stats_mean' > /tmp/ccrOm9yz.o(.text+0x3f): undefined reference to `gsl_stats_variance' > /tmp/ccrOm9yz.o(.text+0x5a): undefined reference to `gsl_stats_max' > /tmp/ccrOm9yz.o(.text+0x75): undefined reference to `gsl_stats_min' > > thanx > waiting for the reply > chew wai