Mail Archives: djgpp/1997/03/29/21:55:37
This is a multi-part message in MIME format.
------=_NextPart_000_01BC3C76.51F13120
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
try making all the functions extern... That is something I was trying to do
too, but after some time abandoned, because it made it hard to debug!
--
Alexey Kouzmitch (the always right or wrong)
P.S.: But then again, maybe not!
Deltaman <deltaman AT geocities DOT com> wrote in article
<333C3C43 DOT 7216 AT geocities DOT com>...
> Hi!
>
> My program have gotten reasonably big, so I decided to split it. I now
> have 'header.h' which contains the prototypes for all functions,
> 'mainprog.c' which contains void main() and some often updated functions
> and 'somefunc.c' which has some fundamental functions.
>
> In 'somefunc.c' I include 'header.h' and 'mainprog.c' and in
> 'mainprog.c' I include 'header.h'. It compiles perfectly (in RHIDE) but
> when I links it I get the error messages:
>
> mainprog.c(a number) Error: multiple definition of <function>
> somefunc.c(same number) Error: first defined here
>
> This happens with all functions (even main) in 'mainprog.c'. What should
> I do to make it work?
> ------------------------------------------------------------------------
> mailto:deltaman AT swipnet DOT se
>
> Please visit my homepage at http://www.geocities.com/TimesSquare/8240
> ------------------------------------------------------------------------
> ______ _______ _______ _______ _______ _______ __ _
> | \ |______ | | |_____| | | | |_____| | \ |
> |_____/ |______ |_____ | | | | | | | | | \_|
>
>
------=_NextPart_000_01BC3C76.51F13120
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<html><head></head><BODY bgcolor=3D"#FFFFFF"><p><font size=3D2 =
color=3D"#000000" face=3D"Arial">try making all the functions extern... =
That is something I was trying to do too, but after some time abandoned, =
because it made it hard to debug!<br><br>-- <br>Alexey Kouzmitch (the =
always right or wrong)<br><br>P.S.: But then again, maybe =
not!<br><br><br><br><br>Deltaman <<font =
color=3D"#0000FF"><u>deltaman AT geocities DOT com</u><font =
color=3D"#000000">> wrote in article <<font =
color=3D"#0000FF"><u>333C3C43 DOT 7216 AT geocities DOT com</u><font =
color=3D"#000000">>...<br>> Hi!<br>> <br>> My program have =
gotten reasonably big, so I decided to split it. I now<br>> have =
'header.h' which contains the prototypes for all functions,<br>> =
'mainprog.c' which contains void main() and some often updated =
functions<br>> and 'somefunc.c' which has some fundamental =
functions.<br>> <br>> In 'somefunc.c' I include 'header.h' and =
'mainprog.c' and in<br>> 'mainprog.c' I include 'header.h'. It =
compiles perfectly (in RHIDE) but<br>> when I links it I get the =
error messages:<br>> <br>> mainprog.c(a number) =
Error: multiple definition of <function><br>> =
somefunc.c(same number) Error: first defined here<br>> <br>> This =
happens with all functions (even main) in 'mainprog.c'. What =
should<br>> I do to make it work?<br>> =
------------------------------------------------------------------------<=
br>> <font color=3D"#0000FF"><u>mailto:deltaman AT swipnet DOT se</u><font =
color=3D"#000000"><br>> <br>> Please visit my homepage at <font =
color=3D"#0000FF"><u>http://www.geocities.com/TimesSquare/8240</u><font =
color=3D"#000000"><br>> =
------------------------------------------------------------------------<=
br>> ______ _______ =
_______ _______ _______ =
_______ __ _<br>> | \ =
|______ | | =
|_____| | | | |_____| | \ |<br>> =
|_____/ |______ |_____ | | =
| | | | | | =
| \_|<br>> <br>> </p>
</font></font></font></font></font></font></font></font></font></body></h=
tml>
------=_NextPart_000_01BC3C76.51F13120--
- Raw text -