From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,d3f1be53c9ffa934 X-Google-Attributes: gidfee84,public From: torstenk@ifi.uio.no (Torsten Robert Kirschner) Subject: Re: How to link a library file Date: 1996/05/29 Message-ID: <4oi7d8$rle@glitnir.ifi.uio.no>#1/1 X-Deja-AN: 157401375 references: <4ofqqd$alm@alpha.comsource.net> content-type: text/plain; charset=ISO-8859-1 organization: Dept. of Informatics, University of Oslo, Norway mime-version: 1.0 reply-to: torstenk@ifi.uio.no newsgroups: comp.unix.osf.osf1 >>>>> "DP" == David Phan writes: In article <4ofqqd$alm@alpha.comsource.net> dphan@alpha.comsource.net (David Phan) writes: DP> I tried to link the library file /usr/local/sql/lib/libsql.a to a DP> C program myprog.c with the following command and got error messages: DP> cc /usr/local/sql/lib/libsql.a myprog.c I'd suggest: cc -L/usr/local/sql/lib -lsql myprog.c In general, a look at cc's man page might be a good idea. Also, if you need header files, you might have to add a -I/usr/local/sql/include. c u T. -- Torsten Robert Kirschner torstenk@ifi.uio.no torki@mpipf-muenchen.mpg.de http://www.ifi.uio.no/~torstenk/index.html