At 03:16 PM 7/17/98 -0600, you wrote:
> I am trying to compile some C++ code developed elsewhere, ...
>
>KSV505DevType.o(.data+0x0): multiple definition of `barr'
>vxi_init.o(.data+0x0): first defined here
Elaine,
I think I know what your problem is. I had the same problem compiling the
same "code developed elsewhere" (Kinetics drivers) on LynxOS. I was using
gcc, and there was an "improvement" between gcc 2.6 and 2.7 in which the
default for common storage of global symbols changed from '-fcommon' to
'-fno-common'.
I took the easy way out by adding '-fcommon' to the gcc command line, and
the problem went away. I notice you're using Wind River cc68k; if this is
based on gcc, try doing a 'gcc -v' or 'cc68k -v'. If it tells you you're
using gcc 2.7, you can probably use the same fix.
If you do have the same problem but you're not using gcc (or you just want
to do it "right"), you need to group all the common declarations into a
single '.c' file linked in with the others (e.g. 'kscdrv.c'), and change
the '.h' declarations to be 'extern'.
Good luck.
Glover Barker
Computer Sciences Corporation
NASA Langley Research Center
[email protected]
- Navigate by Date:
- Prev:
strange error compiling C++ code under EPICS Elaine Best
- Next:
New 167 Garrett D. Rinehart
- Index:
1994
1995
1996
1997
<1998>
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
strange error compiling C++ code under EPICS Elaine Best
- Next:
New 167 Garrett D. Rinehart
- Index:
1994
1995
1996
1997
<1998>
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|