EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Problems building with Microsoft Visual Studio 2005 (VC8)
From: "Mark Rivers" <[email protected]>
To: <[email protected]>, <[email protected]>
Date: Sat, 24 May 2008 13:46:38 -0500
Folks,
 
I've run into 2 problems building EPICS modules with MS Visual Studio 2005 (VC 8).  These problems do not occur when building with Visual Studio .NET 2003 (VC 7.1).
 
1)  In seq 2-0-11 the executable snc.exe crashes when building state programs.  Thanks to Tim Graber, this was tracked down to the following lines:
 
snc_main.c.orig:        setvbuf(stdout, NULL, _IOLBF, 0);
snc_main.c.orig:        setvbuf(stderr, NULL, _IOLBF, 0);
 
The problem lies with the final argument, SIZE.  It appears that the above syntax should be OK, because according to the Mac documentation I found
 
*****
  The setlinebuf() function is exactly equivalent to the call:

           setvbuf(stream, (char *)NULL, _IOLBF, 0);
*****
 
We have found that specifying a size like 1024 seems to work, but what is the correct way to work around this bug in VC8, if indeed that is what it is?
 
2) When building the "stream" module (2-2) I got the following error when linking the example application streamApp:
 
link -nologo  /debug /incremental:no /fixed:no           -out:streamApp.exe      streamApp_registerRecordDeviceDriver.ob
j streamAppMain.obj     ../../../lib/win32-x86/stream.lib  C:/EPICS/devel/asyn/4-10beta/lib/win32-x86/asyn.lib  C:/EPICS
/devel/calc/2-6-5beta/lib/win32-x86/calc.lib  C:/EPICS/devel/sscan/2-5-7beta/lib/win32-x86/sscan.lib  C:/EPICS/base-3.14
.8.2/lib/win32-x86/recIoc.lib  C:/EPICS/base-3.14.8.2/lib/win32-x86/softDevIoc.lib  C:/EPICS/base-3.14.8.2/lib/win32-x86
/iocsh.lib  C:/EPICS/base-3.14.8.2/lib/win32-x86/miscIoc.lib  C:/EPICS/base-3.14.8.2/lib/win32-x86/rsrvIoc.lib  C:/EPICS
/base-3.14.8.2/lib/win32-x86/dbtoolsIoc.lib  C:/EPICS/base-3.14.8.2/lib/win32-x86/asIoc.lib  C:/EPICS/base-3.14.8.2/lib/
win32-x86/dbIoc.lib  C:/EPICS/base-3.14.8.2/lib/win32-x86/registryIoc.lib  C:/EPICS/base-3.14.8.2/lib/win32-x86/dbStatic
Ioc.lib  C:/EPICS/base-3.14.8.2/lib/win32-x86/ca.lib  C:/EPICS/base-3.14.8.2/lib/win32-x86/Com.lib  ../../../lib/win32-x
86/streamSynApps.lib  ws2_32.lib advapi32.lib user32.lib kernel32.lib winmm.lib
stream.lib(StreamEpics.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG t
o the link command line to improve linker performance
LIBCMT.lib(calloc.obj) : error LNK2005: _calloc already defined in LIBCMTD.lib(dbgheap.obj)
   Creating library streamApp.lib and object streamApp.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
streamApp.exe : fatal error LNK1169: one or more multiply defined symbols found
make[3]: *** [streamApp.exe] Error 145
make[3]: Leaving directory `/cygdrive/c/EPICS/devel/stream/2-2/streamDevice/streamApp/O.win32-x86'
make[2]: *** [install.win32-x86] Error 2
make[2]: Leaving directory `/cygdrive/c/EPICS/devel/stream/2-2/streamDevice/streamApp'
make[1]: *** [streamApp.install] Error 2
make[1]: Leaving directory `/cygdrive/c/EPICS/devel/stream/2-2/streamDevice'
make: *** [streamDevice.install] Error 2

If I understand this error message, it is complaining that because LIBCMTD has already been included (because it was done with "link /debug" ?) that LIBCMT is producing duplicate symbols.  This did not happen with VC7.1, with the same version of stream.  I cannot even figure out why it is using the /debug flag, and how to avoid the error?
 
Thanks,
Mark
 
 
 


Replies:
Re: Problems building with Microsoft Visual Studio 2005 (VC8) Andrew Johnson

Navigate by Date:
Prev: Controls Position at SLAC Shoaee, Hamid
Next: Re: Missing include in WIN32/osdTime.cpp? Zhichu Chen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Controls Position at SLAC Shoaee, Hamid
Next: Re: Problems building with Microsoft Visual Studio 2005 (VC8) Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·