public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Michael Kahle" <geopoliticus@onebox.com>
To: gcc-help@gcc.gnu.org
Subject: newbie gcc question...
Date: Mon, 29 Apr 2002 18:21:00 -0000	[thread overview]
Message-ID: <20020429235737.DRFK4876.mta09.onebox.com@onebox.com> (raw)

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 

             reply	other threads:[~2002-04-29 23:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-29 18:21 Michael Kahle [this message]
2002-04-29 18:45 ` Claudio Bley
2002-04-29 19:48 ` Andrea 'Fyre Wyzard' Bocci
  -- strict thread matches above, loose matches on Subject: below --
2002-04-29 20:14 Michael Kahle
2002-04-29 19:51 Michael Kahle
1999-10-13 15:54 Maggie Owens
1999-10-13 16:09 ` Matthew Majka
1999-10-14  0:05   ` Johan Nilson
1999-10-14  9:58     ` Matthew Majka
1999-10-31 13:57       ` Matthew Majka
1999-10-31 13:57     ` Johan Nilson
1999-10-31 13:57   ` Matthew Majka
1999-10-13 22:53 ` Konstantinos Adamopoulos
1999-10-31 13:57   ` Konstantinos Adamopoulos
1999-10-14 12:25 ` Maggie Owens
1999-10-31 13:57   ` Maggie Owens
1999-10-31 13:57 ` Maggie Owens
1999-09-12 15:32 Newbie " Wayne Willson
1999-09-12 15:47 ` Tim Prince
1999-09-30 23:56   ` Tim Prince
1999-10-01  0:00   ` Tim Prince
1999-09-12 21:47 ` Chris Gregory
1999-09-30 23:56   ` Chris Gregory
1999-10-01  0:00   ` Chris Gregory
1999-09-30 23:56 ` Wayne Willson
1999-10-01  0:00 ` Wayne Willson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020429235737.DRFK4876.mta09.onebox.com@onebox.com \
    --to=geopoliticus@onebox.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).