www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - Previous Definition Different

reply "Stephen De Chellis" <steve hmtk.com> writes:
Hello,

    I'm trying to re-use some of my code in a new app and I've hit a snag
early on...

    I'm getting the "Previous Definition Different" error code when I add in
my common dlg file i/o functions.

    Any help would be much appreciated!
--
Thank You
Stephen De Chellis
steve hmtk.com

www.hmtk.com for HMTK information
www.kenzerco.com for HackMaster information
Nov 07 2002
parent reply "Walter" <walter digitalmars.com> writes:
That message usually means you have the same name defined twice.

"Stephen De Chellis" <steve hmtk.com> wrote in message
news:aqdvne$1j0g$1 digitaldaemon.com...
 Hello,

     I'm trying to re-use some of my code in a new app and I've hit a snag
 early on...

     I'm getting the "Previous Definition Different" error code when I add

 my common dlg file i/o functions.

     Any help would be much appreciated!
 --
 Thank You
 Stephen De Chellis
 steve hmtk.com

 www.hmtk.com for HMTK information
 www.kenzerco.com for HackMaster information

Nov 07 2002
parent reply "Stephen De Chellis" <steve hmtk.com> writes:
I understand about defining the same name twice, what I can not figure out
is what I am defining twice! The code is exactly the same as from where I
harvested it from, and I'm not aware of having anything defined!


--
Thank You
Stephen De Chellis
steve hmtk.com

www.hmtk.com for HMTK information
www.kenzerco.com for HackMaster information
"Walter" <walter digitalmars.com> wrote in message
news:aqe42k$1nfv$1 digitaldaemon.com...
 That message usually means you have the same name defined twice.

 "Stephen De Chellis" <steve hmtk.com> wrote in message
 news:aqdvne$1j0g$1 digitaldaemon.com...
 Hello,

     I'm trying to re-use some of my code in a new app and I've hit a


 early on...

     I'm getting the "Previous Definition Different" error code when I


 in
 my common dlg file i/o functions.

     Any help would be much appreciated!
 --
 Thank You
 Stephen De Chellis
 steve hmtk.com

 www.hmtk.com for HMTK information
 www.kenzerco.com for HackMaster information


Nov 07 2002
parent reply "Walter" <walter digitalmars.com> writes:
The error message says the name that is defined multiple times. Try grepping
the source code and .h files for the name. -Walter

"Stephen De Chellis" <steve hmtk.com> wrote in message
news:aqefh2$23bu$1 digitaldaemon.com...
 I understand about defining the same name twice, what I can not figure out
 is what I am defining twice! The code is exactly the same as from where I
 harvested it from, and I'm not aware of having anything defined!


 --
 Thank You
 Stephen De Chellis
 steve hmtk.com

 www.hmtk.com for HMTK information
 www.kenzerco.com for HackMaster information
 "Walter" <walter digitalmars.com> wrote in message
 news:aqe42k$1nfv$1 digitaldaemon.com...
 That message usually means you have the same name defined twice.

 "Stephen De Chellis" <steve hmtk.com> wrote in message
 news:aqdvne$1j0g$1 digitaldaemon.com...
 Hello,

     I'm trying to re-use some of my code in a new app and I've hit a


 early on...

     I'm getting the "Previous Definition Different" error code when I


 in
 my common dlg file i/o functions.

     Any help would be much appreciated!
 --
 Thank You
 Stephen De Chellis
 steve hmtk.com

 www.hmtk.com for HMTK information
 www.kenzerco.com for HackMaster information



Nov 07 2002
parent reply "Rajiv Bhagwat" <dataflow vsnl.com> writes:
Stephen, you are compiling both fairy.c and fmtkfile.c: This is not
required, as you are including fmtkfile.c inside fairy.c. Just compile
fairy.c, the multiple defn error vanishes.
ie instead of:
sc -mn -cpp fairy.c fmtkfile.c
Just use:
sc -mn -cpp fairy.c

Ideally, avoid such includes.
Also, it is not a good practice to put function source inside a header file,
as you have done in 'file.h'. You will land up in similar trouble if this
header is included in multiple sources. (Such a thing should only be done
for 'inline' or 'template' functions.)
- Rajiv


"Walter" <walter digitalmars.com> wrote in message
news:aqf8sg$2s9n$1 digitaldaemon.com...
 The error message says the name that is defined multiple times. Try

 the source code and .h files for the name. -Walter

 "Stephen De Chellis" <steve hmtk.com> wrote in message
 news:aqefh2$23bu$1 digitaldaemon.com...
 I understand about defining the same name twice, what I can not figure


 is what I am defining twice! The code is exactly the same as from where


 harvested it from, and I'm not aware of having anything defined!


 --
 Thank You
 Stephen De Chellis
 steve hmtk.com

 www.hmtk.com for HMTK information
 www.kenzerco.com for HackMaster information
 "Walter" <walter digitalmars.com> wrote in message
 news:aqe42k$1nfv$1 digitaldaemon.com...
 That message usually means you have the same name defined twice.

 "Stephen De Chellis" <steve hmtk.com> wrote in message
 news:aqdvne$1j0g$1 digitaldaemon.com...
 Hello,

     I'm trying to re-use some of my code in a new app and I've hit a


 early on...

     I'm getting the "Previous Definition Different" error code when




 add
 in
 my common dlg file i/o functions.

     Any help would be much appreciated!
 --
 Thank You
 Stephen De Chellis
 steve hmtk.com

 www.hmtk.com for HMTK information
 www.kenzerco.com for HackMaster information




Nov 07 2002
parent "Stephen De Chellis" <steve hmtk.com> writes:
Ahhh.... That explains it to me.

I'm rather new at all this, only about 1 year.


--
Thank You
Stephen De Chellis
steve hmtk.com

www.hmtk.com for HMTK information
www.kenzerco.com for HackMaster information
"Rajiv Bhagwat" <dataflow vsnl.com> wrote in message
news:aqfl80$74s$1 digitaldaemon.com...
 Stephen, you are compiling both fairy.c and fmtkfile.c: This is not
 required, as you are including fmtkfile.c inside fairy.c. Just compile
 fairy.c, the multiple defn error vanishes.
 ie instead of:
 sc -mn -cpp fairy.c fmtkfile.c
 Just use:
 sc -mn -cpp fairy.c

 Ideally, avoid such includes.
 Also, it is not a good practice to put function source inside a header

 as you have done in 'file.h'. You will land up in similar trouble if this
 header is included in multiple sources. (Such a thing should only be done
 for 'inline' or 'template' functions.)
 - Rajiv


 "Walter" <walter digitalmars.com> wrote in message
 news:aqf8sg$2s9n$1 digitaldaemon.com...
 The error message says the name that is defined multiple times. Try

 the source code and .h files for the name. -Walter

 "Stephen De Chellis" <steve hmtk.com> wrote in message
 news:aqefh2$23bu$1 digitaldaemon.com...
 I understand about defining the same name twice, what I can not figure


 is what I am defining twice! The code is exactly the same as from



 I
 harvested it from, and I'm not aware of having anything defined!


 --
 Thank You
 Stephen De Chellis
 steve hmtk.com

 www.hmtk.com for HMTK information
 www.kenzerco.com for HackMaster information
 "Walter" <walter digitalmars.com> wrote in message
 news:aqe42k$1nfv$1 digitaldaemon.com...
 That message usually means you have the same name defined twice.

 "Stephen De Chellis" <steve hmtk.com> wrote in message
 news:aqdvne$1j0g$1 digitaldaemon.com...
 Hello,

     I'm trying to re-use some of my code in a new app and I've hit





 snag
 early on...

     I'm getting the "Previous Definition Different" error code





 I
 add
 in
 my common dlg file i/o functions.

     Any help would be much appreciated!
 --
 Thank You
 Stephen De Chellis
 steve hmtk.com

 www.hmtk.com for HMTK information
 www.kenzerco.com for HackMaster information





Nov 08 2002