Closed kmpeters closed 8 years ago
I can't reproduce this problem. I am using Visual Studio 2010, base 3.14.12.5.
cl -c /nologo /D__STDC__=0 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /Ox /GL /W3 /w44355
-DHDF5 -D_FILE_OFFSET_BITS=64 -DH5_NO_DEPRECATED_SYMBOLS
-DH5Gopen_vers=2 -DDLL_NEXUS -DH5_BUILT_AS_DYNAMIC_LIB
-DDLL_EXPORT /MD -I. -I..\\O.Common -I. -I..\\os\\WIN32 -I..\\os\\default
-I.. -I..\\..\\..\\include\\os\\WIN32 -I..\\..\\..\\include
-IP:\\epics\\epics\\devel\\areaDetector-2-5\\include\\os\\WIN32
-IP:\\epics\\epics\\devel\\areaDetector-2-5\\include
-IP:\\epics\\epics\\base-3.14.12.5\\include\\os\\WIN32
-IP:\\epics\\epics\\base-3.14.12.5\\include
-IP:\\epics\\epics\\devel\\asyn-4-30\\include
-IP:\\epics\\epics\\devel\\areaDetector-2-5\\ADSupport\\include\\os\\WIN32
-IP:\\epics\\epics\\devel\\areaDetector-2-5\\ADSupport\\include
-IP:\\epics\\epics\\devel\\areaDetector-2-5\\ADCore\\include
-IP:\\epics\\epics\\epicsV4\\bundleCPP\\pvCommonCPP\\include
-IP:\\epics\\epics\\epicsV4\\bundleCPP\\pvAccessCPP\\include
-IP:\\epics\\epics\\epicsV4\\bundleCPP\\pvDataCPP\\include
-IP:\\epics\\epics\\epicsV4\\bundleCPP\\pvDatabaseCPP\\include
-IP:\\epics\\epics\\epicsV4\\bundleCPP\\normativeTypesCPP\\include
..\\stptok.c
stptok.c
link /nologo /subsystem:windows /dll /LTCG /incremental:no /opt:ref /release
/implib:NeXus.lib /out:NeXus.dll
napi.obj napi5.obj napiu.obj nxdataset.obj nxio.obj nxstack.obj nxxml.obj stptok.obj
..\\..\\..\\lib\\win32-x86\\hdf5.lib ..\\..\\..\\lib\\win32-x86\\szip.lib
..\\..\\..\\lib\\win32-x86\\zlib.lib
Creating library NeXus.lib and object NeXus.exp
Generating code
Finished generating code
"Installing shared library ../../../bin/win32-x86/NeXus.dll"
"Installing library ../../../lib/win32-x86/NeXus.lib"
make[1]: Leaving directory 'P:/epics/epics/devel/areaDetector-2-5/ADSupport/supportApp/nexusSrc/O.win32-x86'
So NeXus.dll links fine for me.
You should run dumpbin /exports on the hdf5.dll file and look for the symbols it is not finding for you. This is what I get
P:\epics\epics\devel\areaDetector-2-5\ADSupport\bin\win32-x86>dumpbin /exports hdf5.dll
Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file hdf5.dll
File Type: DLL
Section contains the following exports for hdf5.dll
00000000 characteristics
57F42F93 time date stamp Tue Oct 04 17:39:15 2016
0.00 version
1 ordinal base
2822 number of functions
2822 number of names
ordinal hint RVA name
1 0 0028B160 H5AC_BT
2 1 0028ABD0 H5AC_BT2_HDR
3 2 0028AC08 H5AC_BT2_INT
4 3 0028AC40 H5AC_BT2_LEAF
5 4 002852F0 H5AC_DRVRINFO
6 5 00287840 H5AC_EARRAY_DBLK_PAGE
7 6 00287808 H5AC_EARRAY_DBLOCK
...
...
2255 8CD 002D88C8 H5T_NATIVE_SHORT_g
2256 8CE 003B5030 H5T_NATIVE_UCHAR_ALIGN_g
2257 8CF 002D88C0 H5T_NATIVE_UCHAR_g
Note that my hdf5.dll file contains the symbols that appear to be undefined for you, but without the leading underscore, i.e. H5T_NATIVE_SHORT_g not _H5T_NATIVE_SHORT_g. You should see if your hdf5.dll file also contains these symbols without the underscore. If it does then we need to figure out why the linker is looking for the leading underscore in your case but not in mine.
It is worth comparing versions of the compiler and linker too. Here are mine:
**P:\epics\epics\devel\areaDetector-2-5\ADSupport\bin\win32-x86>cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
P:\epics\epics\devel\areaDetector-2-5\ADSupport\bin\win32-x86>link
Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
I found the problem. Kevin's compile command included -DH5_BUILT_AS_STATIC_LIB
, while mine had -DH5_BUILT_AS_DYNAMIC_LIB
. The latter is correct, since this is the dynamic win32-x86 architecture, building a DLL. The problem was that he did not have the file areaDetector/configure/CONFIG_SITE.local.WIN32, which contains the line:
HDF5_STATIC_BUILD=$(STATIC_BUILD)
That is necessary to correctly set the -DH5_BUILT_AS_STATIC_LIB
or -DH5_BUILT_AS_DYNAMIC_LIB
flags when building HDF5 on Windows.
I'm getting the following link error when building ADSupport dynamically using both VS2010 and VS2015 against both base-3.14.12.5 and base-3.15.4:
I suspect something may be wrong with my CONFIG_SITE.local. Here are the relevant values from it:
Is something obviously misconfigured?