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

Subject: RE: Problems compiling Nexus library as DLL on Windows
From: Mark Rivers <[email protected]>
To: Pete R Jemian <[email protected]>, Jan Ilavsky <[email protected]>, "'Mark Koennecke'" <[email protected]>, "Madden, Timothy J." <[email protected]>, "'[email protected]'" <[email protected]>, "'[email protected]'" <[email protected]>, "'Glowacki, Arthur T.'" <[email protected]>, "Schwarz, Nicholas" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 23 Aug 2013 03:21:02 +0000
I have identified the problem, but have not solved it.

The file  H5Tpublic.h contains definitions like the following:

H5_DLLVAR hid_t H5T_NATIVE_UINT32_g;

The problem is that when H5Tpublic.h is being included the macro H5_DLLVAR is not correctly defined to be "__declspec(dllimport)".   Rather H5_DLLVAR appears to be defined as "extern".  This causes the linker to be unable to locate these symbols, even though they are correctly exported by the .lib file.

I just need to figure out why H5_DLLVAR is not being correctly defined in H5api_adpt.h.  It looks like it should be, but clearly I am doing something wrong.

Mark


________________________________
From: Mark Rivers
Sent: Thursday, August 22, 2013 2:56 PM
To: Pete R Jemian; Jan Ilavsky; 'Mark Koennecke'; Madden, Timothy J.; '[email protected]'; '[email protected]'; 'Glowacki, Arthur T.'; Schwarz, Nicholas
Cc: [email protected]
Subject: Problems compiling Nexus library as DLL on Windows

Folks,

The EPICS areaDetector software has been successfully using the HDF5 library (1.8.7) on Windows since R1-7, about 2 years ago.  However, only the statically linked version of the library was installed, which meant that areaDetector applications needed to be statically linked.

I am now writing a driver that must be dynamically linked, because it uses the Microsoft Common Library Runtime (/clr switch on linker).  So I want to also install and use the dynamic version of the HDF5 library.  I installed the dynamic versions of the required .lib files from HDF5-1.8.7_CMake_x64_shared.zip, from the HDF Web site.

When I try to build the ADApp\nexusSrc directory it compiles fine, but I get these errors it tries to link the DLL.   Does anyone know what I am doing wrong?

J:\epics\devel\areaDetector\ADApp\nexusSrc>make
make -C O.windows-x64-dynamic -f ../Makefile TOP=../../.. T_A=windows-x64-dynamic install
make[1]: Entering directory `J:/epics/devel/areaDetector/ADApp/nexusSrc/O.windows-x64-dynamic'
link /nologo /subsystem:windows /dll /LTCG /incremental:no /opt:ref /release   /MACHINE:X64     /implib:NeXus.lib /out:NeXus.dll          napi.obj napi5.obj napiu.obj nxdataset.obj  nxio.obj nxstack.obj nxxml.obj stptok.obj      ..\\..\\..\\lib\\windows-x64-dynamic\\hdf5.lib  ..\\..\\..\\lib\\windows-x64-dynamic\\libszip.lib  ..\\..\\..\\lib\\windows-x64-dynamic\\zlib.lib
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_SHORT_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_INT32_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_INT_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_INT8_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_UINT64_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_USHORT_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_UINT_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_UCHAR_g
napi5.obj : error LNK2001: unresolved external symbol H5P_CLS_DATASET_CREATE_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_SCHAR_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_FLOAT_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_UINT8_g
napi5.obj : error LNK2001: unresolved external symbol H5T_C_S1_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_INT16_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_UINT16_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_UINT32_g
napi5.obj : error LNK2001: unresolved external symbol H5P_CLS_FILE_ACCESS_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_INT64_g
napi5.obj : error LNK2001: unresolved external symbol H5T_NATIVE_DOUBLE_g
NeXus.dll : fatal error LNK1120: 19 unresolved externals
make[1]: *** [NeXus.dll] Error 1120
make[1]: Leaving directory `J:/epics/devel/areaDetector/ADApp/nexusSrc/O.windows-x64-dynamic'
make: *** [install.windows-x64-dynamic] Error 2


Thanks,
Mark




Replies:
Re: Problems compiling Nexus library as DLL on Windows Andrew Johnson
References:
Problems compiling Nexus library as DLL on Windows Mark Rivers

Navigate by Date:
Prev: RE: Asyn AutoConnect and stream device on a soft IOC Mark Rivers
Next: Re: streamdevice to find the last match Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Problems compiling Nexus library as DLL on Windows Timothy Madden
Next: Re: Problems compiling Nexus library as DLL on Windows Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·