EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  <19981999  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  Index 1994  1995  1996  1997  <19981999  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 
<== Date ==> <== Thread ==>

Subject: Re: strange error compiling C++ code under EPICS
From: Glover Barker <[email protected]>
To: [email protected]
Date: Mon, 20 Jul 1998 08:27:49 -0400
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  <19981999  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  <19981999  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 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·