Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #70989

Re: Irritating multiple redefinition problem -- please help

From Ike Naar <ike@iceland.freeshell.org>
Newsgroups comp.lang.c
Subject Re: Irritating multiple redefinition problem -- please help
Date 2015-09-20 20:24 +0000
Organization A noiseless patient Spider
Message-ID <slrn3vfsmvu5k6.l8q.ike@iceland.freeshell.org> (permalink)
References <d26a19b9-2aa7-451d-9df4-14ece63ad4a2@googlegroups.com>

Show all headers | View raw


On 2015-09-14, dakupoto@gmail.com <dakupoto@gmail.com> wrote:
> Could some C guru please help ? I have the 
> following set of ".h" and ".c" files.
> A.h, B.h, C.h, B.c and C.c. A.h contains
> constants as:
> const double PI2 = 6.28;
> and so on.
> A.h is included in B.h.
> and B.h is included in 
> C.h 
> The main executable is C.c
> (contains int main(int argc, 
> char **argv)) and uses 
> utility functions defined 
> in B.c 
> I compile with the command 
> line:
> gcc -g -o C.c B.c -lm

Are you sure the '-o C.c' part of the command line is correct?
It instructs gcc to create an output file named C.c .

Back to comp.lang.c | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Irritating multiple redefinition problem -- please help dakupoto@gmail.com - 2015-09-13 20:39 -0700
  Re: Irritating multiple redefinition problem -- please help Ian Collins <ian-news@hotmail.com> - 2015-09-14 15:50 +1200
    Re: Irritating multiple redefinition problem -- please help David Brown <david.brown@hesbynett.no> - 2015-09-14 10:24 +0200
      Re: Irritating multiple redefinition problem -- please help August Karlstrom <fusionfile@gmail.com> - 2015-09-14 14:39 +0200
        Re: Irritating multiple redefinition problem -- please help David Brown <david.brown@hesbynett.no> - 2015-09-14 15:45 +0200
          Re: Irritating multiple redefinition problem -- please help Richard Heathfield <rjh@cpax.org.uk> - 2015-09-14 14:52 +0100
            Re: Irritating multiple redefinition problem -- please help August Karlstrom <fusionfile@gmail.com> - 2015-09-14 18:13 +0200
          Re: Irritating multiple redefinition problem -- please help Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-09-14 16:41 +0100
          Re: Irritating multiple redefinition problem -- please help dakupoto@gmail.com - 2015-09-14 19:47 -0700
            Re: Irritating multiple redefinition problem -- please help Paul N <gw7rib@aol.com> - 2015-09-15 16:00 -0700
  Re: Irritating multiple redefinition problem -- please help gordonb.78i5t@burditt.org (Gordon Burditt) - 2015-09-13 23:40 -0500
  Re: Irritating multiple redefinition problem -- please help Ike Naar <ike@iceland.freeshell.org> - 2015-09-20 20:24 +0000

csiph-web