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  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  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  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Stream fails on windows-x64 against base-7.0.2
From: Ralph Lange via Tech-talk <[email protected]>
To: EPICS Tech Talk <[email protected]>
Cc: "Gofron, Kazimierz" <[email protected]>
Date: Thu, 20 Dec 2018 21:54:02 +0100
Hi,

That seems to be a problem with Windows DLL decorations on functions/variables.
It may appear when a source file (in your case the sources for the three .obj files in your error message) does not include a header file for things it uses in the import section of its #include block. The symbols might still be defined (through secondary include by one of your own header files from the export part of the #include block) but in that case they get marked as exported (instead of imported) so the linker searches for them in your objects (not in the libraries).

In principle, your source does

#include <system-bla>       // this is the import section, external symbols are marked as being DLL-imported
#include <epics-bla>

#include <epicsExport.h>    // from here Windows starts marking external symbols as being DLL-exported

#include <myHeader.h>
#include <myOtherHeader.h>
[...]

Now, if your source uses pdbbase (which is declared in dbAccessDefs.h), but relies on dbAccessDefs.h being included by myHeader.h, pdbbase will be declared after switching to export mode and be marked as exported, which is wrong.
Solution: #include <dbAccessDefs.h> in the source that uses its symbols, in the upper section (*before* including <epicsExport.h>) and it will be marked correctly.

Sorry if this sounds complicated. It is.

Cheers,
~Ralph



On Thu, 20 Dec 2018 at 21:34, Gofron, Kazimierz via Tech-talk <[email protected]> wrote:

Stream master release, cloned today.

 

C:\epics\support\stream>git branch

* master

 

 

From: Mark Rivers <[email protected]>
Sent: Thursday, 20 December 2018 3:18 PM
To: Gofron, Kazimierz <[email protected]>
Cc: [email protected]
Subject: RE: Stream fails on windows-x64 against base-7.0.2

 

You didn’t tell us what version of stream you are using.  It is building OK for me on Windows.

 

Mark

 

 

From: [email protected] <[email protected]> On Behalf Of Gofron, Kazimierz via Tech-talk
Sent: Thursday, December 20, 2018 1:38 PM
To: '[email protected]' <[email protected]>
Subject: Stream fails on windows-x64 against base-7.0.2

 

I am using:

 

Windows 10 Pro

Visual Studio 2010 Professional

Make 4.2.1 (from the EPICS web site)
Strawberry perl (v5.28.1.1)

 

This issue is similar to:

https://github.com/epics-modules/softGlue/issues/1

and

https://github.com/epics-modules/sscan/issues/3

 

link -nologo -subsystem:windows -dll -LTCG -incremental:no -opt:ref -release  -MACHINE:X64      -out:stream.dll -implib:stream.lib     DebugInterface.obj DummyInterface.obj AsynDriverInterface.obj EnumConverter.obj BCDConverter.obj RawConverter.obj RawFloatConverter.obj BinaryConverter.obj ChecksumConverter.obj MantissaExponentConverter.obj TimestampConverter.obj devaoStream.obj devaiStream.obj devboStream.obj devbiStream.obj devmbboStream.obj devmbbiStream.obj devmbboDirectStream.obj devmbbiDirectStream.obj devlongoutStream.obj devlonginStream.obj devstringoutStream.obj devstringinStream.obj devwaveformStream.obj devcalcoutStream.obj devaaiStream.obj devaaoStream.obj devscalcoutStream.obj StreamVersion.obj StreamBuffer.obj StreamError.obj StreamProtocol.obj StreamFormatConverter.obj StreamCore.obj StreamBusInterface.obj StreamEpics.obj      c:/epics/support/asyn/lib/windows-x64/asyn.lib  c:/epics/base-7.0.2/lib/windows-x64/dbRecStd.lib  c:/epics/base-7.0.2/lib/windows-x64/dbCore.lib  c:/epics/base-7.0.2/lib/windows-x64/ca.lib  c:/epics/base-7.0.2/lib/windows-x64/Com.lib

   Creating library stream.lib and object stream.exp

devaoStream.obj : error LNK2001: unresolved external symbol interruptAccept

devwaveformStream.obj : error LNK2001: unresolved external symbol pamapdbfType

StreamEpics.obj : error LNK2001: unresolved external symbol pdbbase

stream.dll : fatal error LNK1120: 3 unresolved externals

make[3]: *** [c:/epics/base-7.0.2/configure/RULES_BUILD:292: stream.dll] Error 1120

make[3]: Leaving directory 'C:/epics/support/stream/StreamDevice/src/O.windows-x64'

make[2]: *** [c:/epics/base-7.0.2/configure/RULES_ARCHS:58: install.windows-x64] Error 2

make[2]: Leaving directory 'C:/epics/support/stream/StreamDevice/src'

make[1]: *** [c:/epics/base-7.0.2/configure/RULES_DIRS:84: src.install] Error 2

make[1]: Leaving directory 'C:/epics/support/stream/StreamDevice'

make: *** [configure/RULES_DIRS:88: StreamDevice.install] Error 2

 

Kaz


References:
Stream fails on windows-x64 against base-7.0.2 Gofron, Kazimierz via Tech-talk
RE: Stream fails on windows-x64 against base-7.0.2 Mark Rivers via Tech-talk
RE: Stream fails on windows-x64 against base-7.0.2 Gofron, Kazimierz via Tech-talk

Navigate by Date:
Prev: RE: Stream fails on windows-x64 against base-7.0.2 Gofron, Kazimierz via Tech-talk
Next: FW: Error compiling EPICS base-7.0.x on OpenSUSE 10.3 Mark Rivers via Tech-talk
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Stream fails on windows-x64 against base-7.0.2 Gofron, Kazimierz via Tech-talk
Next: RE: Stream fails on windows-x64 against base-7.0.2 Mark Rivers via Tech-talk
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 20 Dec 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·