From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20626 invoked by alias); 29 Apr 2002 23:57:44 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 20611 invoked from network); 29 Apr 2002 23:57:37 -0000 Received: from unknown (HELO mta09.onebox.com) (64.68.76.81) by sources.redhat.com with SMTP; 29 Apr 2002 23:57:37 -0000 Received: from onebox.com ([10.1.111.8]) by mta09.onebox.com (InterMail vM.4.01.03.23 201-229-121-123-20010418) with SMTP id <20020429235737.DRFK4876.mta09.onebox.com@onebox.com> for ; Mon, 29 Apr 2002 16:57:37 -0700 Received: from [63.98.140.184] by onebox.com with HTTP; Mon, 29 Apr 2002 16:57:37 -0700 Date: Mon, 29 Apr 2002 18:21:00 -0000 Subject: newbie gcc question... From: "Michael Kahle" To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Message-Id: <20020429235737.DRFK4876.mta09.onebox.com@onebox.com> X-SW-Source: 2002-04/txt/msg00315.txt.bz2 hello. I hope this question is not creating any unnecessary noise. If it is, i apologize up front and ask you lead me to the correct faq or other helpful document. I am trying to teach myself the c language and a program I am creating at compile time is giving me the error: undefined reference to 'bla_bla1' undefined reference to 'bla_bla2' undefined reference to 'bla_bla3' etc... This is the first c program I have written that requires me to use the #include directive in my program. I have a file called bla_bla.h in this file i have the lines: void bla_bla1(int); int bla_bla2(int); int bla_bla3(int); I also have another file called tbla_bla.c that has the directive: #include "bla_bla.h" in it. When I try and compile this I get the error above. The files are all located in the same directory and I run gcc from that directory with the following command line... gcc -d -l bla_bla.h bla_bla.c -o bla_bla.o What is causing this error?! I know I am doing something wrong. Unfortunatly the O'Reilly book I am using for my learning (Practical C Programming) doesn't give a hint as to what command line options I should be using when using gcc to include header files. I have poked around on the net for my answer and tried quite a few different things. Please help. I am new to all of this so please be nice. :) Thank you very much. Michael