EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  <20002001  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  1998  1999  <20002001  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: Build static libraries on WinNT
From: Vladimir Sirotenko <[email protected]>
To: Janet Anderson <[email protected]>
Cc: EPICS Techtalk <[email protected]>
Date: Wed, 10 May 2000 09:53:57 -0500
Thanks, Janet

You were absolutely right, it worked.
Just for people who will make static build on NT: despite the fact that when
you build default
EPICS base, xxxObj.lib libraries were created, you can not use them in the
static application
build. You have to build base EPICS with both STATIC_BUILD=YES and
SHARED_LIBRARIES=NO
swithes. You can see the difference immediately, even size of the libraries
is different, for example
casObj.lib is 1,355Kb in the default (DLL) build and 300Kb only in the
static build.
It's still unclear to me why in the default DLL base build those libraries
xxxObj.lib were created ..
to work with DLL's xxx.lib and created xxx.dll's are enough.

Vladimir

----- Original Message -----
From: "Janet Anderson" <[email protected]>
To: "Vladimir Sirotenko" <[email protected]>
Sent: Tuesday, May 09, 2000 5:53 PM
Subject: Re: Build static libraries on WinNT


> I think that on win32 you may have to have set both
>
> STATIC_BUILD=YES
> and
>
> SHARED_LIBRARIES=NO
>
> Janet
>
>
>
> Vladimir Sirotenko wrote:
>
> > Hi,
> >
> > I am having problems with linking my server application with static
EPICS
> > libraries (like xxxObj.lib from
> > the default build) on NT.
> > It's a mistery to me:
> > when I build make from cas\example and asking
> > make host STATIC_BUILD=YES
> > I got
> >
> > cl  /nologo /D__STDC__=0 /Ox  /W3
> >    /MT    -I. -I..  -I../../../../../include
> > -I../../../../../include/os/WIN32      -c /Tp  ../exChannel.cc
> > exChannel.cc
> > make[3]: Entering directory
> > `D:/epics/R3.13.2.DLL/base/src/cas/example/simple/O.
> > WIN32'
> > link -nologo /WARN:3 /incremental:no /opt:ref /release
> > ion:3.13      -out:e
> > xcas.exe main.obj exServer.obj exPV.obj exVectorPV.obj exScalarPV.obj
> > exAsyncPV.
> > obj exChannel.obj    ../../../../../lib/WIN32/casObj.lib
> > ../../../../../lib/WIN
> > 32/caObj.lib  ../../../../../lib/WIN32/gddObj.lib
> > ../../../../../lib/WIN32/ComO
> > bj.lib   ws2_32.lib advapi32.lib user32.lib
> > MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fprintf already defined in
> > LIBCMT.lib(f
> > printf.obj)
> > MSVCRT.lib(MSVCRT.dll) : error LNK2005: _printf already defined in
> > LIBCMT.lib(pr
> > intf.obj)
> > MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strstr already defined in
> > LIBCMT.lib(st
> >
> > and so on ...........
> >
> > It looks like producing a base build with /MD compiler option (which
uses
> > MSVCRT.LIB) and trying to
> > build application with /MT compiler option (LIBCMT.LIB)
> >
> > So I decided to go step by step and build base EPICS from scratch on
Windows
> > NT.
> > Using explicitly make command
> >
> > make host SHARED_LIBRARIES=NO
> >
> > but did not get through, I received:
> >
> > cl  /nologo /D__STDC__=0 /Ox  /W3
> >
> >
/MD -DEPICS_DLL_NO  -I. -I..  -I../../../include -I../../../include/os/WIN32
> >       -c   ../sdr2device.c
> > sdr2device.c
> > cl  /nologo /D__STDC__=0 /Ox  /W3
> >
> >
/MD -DEPICS_DLL_NO  -I. -I..  -I../../../include -I../../../include/os/WIN32
> >       -c   ../sdr2recordtype.c
> > sdr2recordtype.c
> > ../sdr2recordtype.c(207) : warning C4018: '<' : signed/unsigned mismatch
> > ../sdr2recordtype.c(224) : warning C4018: '<' : signed/unsigned mismatch
> > ../sdr2recordtype.c(122) : warning C4101: 'precDes' : unreferenced local
> > variable
> > ../sdr2recordtype.c(139) : warning C4101: 'valuestring' : unreferenced
local
> > variable
> > ../sdr2recordtype.c(123) : warning C4101: 'pchoiceRec' : unreferenced
local
> > variable
> > make[3]: *** No rule to make target `../../../lib/WIN32/Com.lib', needed
by
> > `sf2db.exe'.  Stop.
> > make[3]: Leaving directory
`D:/epics/R3.13.2.N/base/src/cvtDctsdr/O.WIN32'
> > make[2]: *** [WIN32] Error 2
> > make[2]: Leaving directory `D:/epics/R3.13.2.N/base/src/cvtDctsdr'
> > make[1]: *** [cvtDctsdr.host] Error 2
> > make[1]: Leaving directory `D:/epics/R3.13.2.N/base/src'
> > make: *** [src.host] Error 2
> >
> > Can you advise me how to handle this situation? Did someone build static
> > libraries on NT?
> >
> > Also, I am little bit confused about the switches: even in case of
static
> > build I still have /MD (multithreaded DLL),
> > but we are not building DLL's. Why it is here? And also, what is the
meaning
> > of __STDC__ flag?
> >
> > Thanks,
> >
> > Vladimir
>
>
>



References:
Build static libraries on WinNT Vladimir Sirotenko

Navigate by Date:
Prev: Capfast for Linux? William Lupton
Next: putAcks Geoff Savage
Index: 1994  1995  1996  1997  1998  1999  <20002001  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: Build static libraries on WinNT Vladimir Sirotenko
Next: Power PC processor Robert Willson
Index: 1994  1995  1996  1997  1998  1999  <20002001  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 ·