Path: chuka.playstation.co.uk!news From: "Rikki Prince" Newsgroups: scee.yaroze.programming.gnu_compiler Subject: Re: undefined reference to Date: Mon, 28 Feb 2000 00:01:12 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 18 Message-ID: <89cdu6$f2c4@chuka.playstation.co.uk> References: <890bpa$6g2@chuka.playstation.co.uk> NNTP-Posting-Host: th-gt142-237.pool.dircon.co.uk X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Cheers for the quick responses Toby and Rob. However, even with your help I couldn't figure out what was going on. Bascially, it worked when I compiled my main.c with the the function code in main.c and even when I compiled it together with precompiled object files of the library source (ie. gcc -o main main.c graphics.o pad.o etc) but not with the library (.a) files I had made with ar (-r libgraph.a graphics.o) using gcc -o main main.c -lgraph -lpad etc. Rather than continue mucking about with that I decided on a different method, as I seemed to be getting nowhere quickly, and the new method worked just as well. Now I am just compiling the library source files into objects, but naming them .lib instead of .o. Then when compiling the program, I include the .lib files in the compilation, just as I did with the .o files, eg gcc -o main main.c graphics.lib pad.lib etc... Cheers Rikki