HDF5 .Net Compile Problems

I have downloaded HDF5.Net have enjoyed using it but I am getting a compile warning saying there is a processor mismatch between the library (AMD64) and what I am compiling. My understanding is my best solution to get around this is to just compile my own libraries. I have downloaded the source code and have tried compiling both in Visual Studio 2012 and the developer command prompt. I have not had any success. At first I had errors with Array which didn't know which overloaded function to use so I specified the parameter as long long. Now I am having other compile problems such as

Generating Code...
H5P.obj : error LNK2020: unresolved token (0A00000C) __imp__H5P_CLS_GROUP_ACCESS_g
H5P.obj : error LNK2020: unresolved token (0A000011) __imp__H5P_CLS_FILE_ACCESS_g
H5P.obj : error LNK2020: unresolved token (0A000012) __imp__H5P_CLS_DATATYPE_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A000015) __imp__H5P_CLS_FILE_MOUNT_g
H5P.obj : error LNK2020: unresolved token (0A000016) __imp__H5P_CLS_DATASET_ACCESS_g
H5P.obj : error LNK2020: unresolved token (0A000017) __imp__H5P_CLS_FILE_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A000018) __imp__H5P_CLS_GROUP_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A000019) __imp__H5P_CLS_LINK_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A00001E) __imp__H5P_CLS_LINK_ACCESS_g
H5P.obj : error LNK2020: unresolved token (0A000022) __imp__H5P_CLS_STRING_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A000023) __imp__H5P_CLS_DATASET_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A000025) __imp__H5P_CLS_DATASET_XFER_g
H5P.obj : error LNK2020: unresolved token (0A000026) __imp__H5P_CLS_ATTRIBUTE_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A000027) __imp__H5P_CLS_ROOT_g
H5P.obj : error LNK2020: unresolved token (0A000028) __imp__H5P_CLS_OBJECT_COPY_g
H5P.obj : error LNK2020: unresolved token (0A000039) __imp__H5P_CLS_DATATYPE_ACCESS_g
H5P.obj : error LNK2020: unresolved token (0A00003B) __imp__H5P_CLS_OBJECT_CREATE_g
H5T.obj : error LNK2020: unresolved token (0A00000D) __imp__H5T_STD_B32BE_g
H5T.obj : error LNK2020: unresolved token (0A000013) __imp__H5T_NATIVE_B64_g
H5T.obj : error LNK2020: unresolved token (0A000015) __imp__H5T_STD_I64BE_g
H5T.obj : error LNK2020: unresolved token (0A000016) __imp__H5T_NATIVE_DOUBLE_g
H5T.obj : error LNK2020: unresolved token (0A000017) __imp__H5T_NATIVE_B16_g
H5T.obj : error LNK2020: unresolved token (0A000018) __imp__H5T_STD_B16LE_g
H5T.obj : error LNK2020: unresolved token (0A00001B) __imp__H5T_STD_U64BE_g
H5T.obj : error LNK2020: unresolved token (0A00001C) __imp__H5T_STD_B64LE_g
H5T.obj : error LNK2020: unresolved token (0A00001E) __imp__H5T_NATIVE_LDOUBLE_g
H5T.obj : error LNK2020: unresolved token (0A000020) __imp__H5T_STD_I8LE_g

Is there a better way to get around the warning? If not, what am I missing in trying to compile?

Thank you,
John Mulholland | Software Engineer
RSG | http://www.rsginc.com<http://www.rsginc.com/>
41 N Rio Grande Street, Suite 106 | Salt Lake City, UT 84101
Office 801.736.4100 | Direct 801.456.4908 | Fax 801.456.2506

Gerd,
Of course you are correct. The DLLs are only used at run time.

I did find the problem. It was trying to build a 32 bit version and the libraries I have installed are 64 bit. By changing it to a 64 bit compile it now works.

Thank you for your help.
John

···

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of John Mulholland
Sent: Tuesday, June 18, 2013 1:49 PM
To: HDF Users Discussion List
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

I run the script and get all the linking errors. I also get the same thing when I try to compile it in visual studio 2012.

John

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Gerd Heber
Sent: Tuesday, June 18, 2013 1:47 PM
To: 'HDF Users Discussion List'
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

It doesn't need the DLLs for compiling the assemblies.
What does your output look like?

G.

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of John Mulholland
Sent: Tuesday, June 18, 2013 2:46 PM
To: HDF Users Discussion List
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

Yes, that is done in the batch file I am using. I am guessing it is finding the libraries but perhaps not the dlls.

John

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Gerd Heber
Sent: Tuesday, June 18, 2013 1:44 PM
To: 'HDF Users Discussion List'
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

You need to set the HDF5_LIB variable (in the script):

SET HDF5_LIB="C:\Program Files\HDF Group\HDF5\1.8.9\lib\hdf5dll.lib"

G.

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of John Mulholland
Sent: Tuesday, June 18, 2013 2:41 PM
To: HDF Users Discussion List
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

I am thinking it might be a problem with my path as I got a warning about it when I installed 1.8.9 saying it was too long. I manually added C:\Program Files\HDF Group\HDF5\1.8.9\bin; to it. Is this correct? Do I need anything else?

John

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of John Mulholland
Sent: Tuesday, June 18, 2013 12:45 PM
To: HDF Users Discussion List
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

The flags are in the batch file, which I am running. I am not sure it is using the correct path to find these. How does it determine the path?

John

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Gerd Heber
Sent: Tuesday, June 18, 2013 12:03 PM
To: 'HDF Users Discussion List'
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

John, how are you? Have you tried using the doit.*.bat scripts to build the libraries?
I've seen this error when I was missing a few flags:

/DHDF5_DOT_NET /DHDF5DLL=\"hdf5dll.dll\" /DHDF5HLDLL=\"hdf5_hldll.dll\"

(See the batch files.)
I don't have VS2012 and can't try this, but you don't need that for building
the assemblies anyway.

G.

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of John Mulholland
Sent: Tuesday, June 18, 2013 10:42 AM
To: hdf-forum@lists.hdfgroup.org<mailto:hdf-forum@lists.hdfgroup.org>
Subject: [Hdf-forum] HDF5 .Net Compile Problems

I have downloaded HDF5.Net have enjoyed using it but I am getting a compile warning saying there is a processor mismatch between the library (AMD64) and what I am compiling. My understanding is my best solution to get around this is to just compile my own libraries. I have downloaded the source code and have tried compiling both in Visual Studio 2012 and the developer command prompt. I have not had any success. At first I had errors with Array which didn't know which overloaded function to use so I specified the parameter as long long. Now I am having other compile problems such as

Generating Code...
H5P.obj : error LNK2020: unresolved token (0A00000C) __imp__H5P_CLS_GROUP_ACCESS_g
H5P.obj : error LNK2020: unresolved token (0A000011) __imp__H5P_CLS_FILE_ACCESS_g
H5P.obj : error LNK2020: unresolved token (0A000012) __imp__H5P_CLS_DATATYPE_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A000015) __imp__H5P_CLS_FILE_MOUNT_g
H5P.obj : error LNK2020: unresolved token (0A000016) __imp__H5P_CLS_DATASET_ACCESS_g
H5P.obj : error LNK2020: unresolved token (0A000017) __imp__H5P_CLS_FILE_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A000018) __imp__H5P_CLS_GROUP_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A000019) __imp__H5P_CLS_LINK_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A00001E) __imp__H5P_CLS_LINK_ACCESS_g
H5P.obj : error LNK2020: unresolved token (0A000022) __imp__H5P_CLS_STRING_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A000023) __imp__H5P_CLS_DATASET_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A000025) __imp__H5P_CLS_DATASET_XFER_g
H5P.obj : error LNK2020: unresolved token (0A000026) __imp__H5P_CLS_ATTRIBUTE_CREATE_g
H5P.obj : error LNK2020: unresolved token (0A000027) __imp__H5P_CLS_ROOT_g
H5P.obj : error LNK2020: unresolved token (0A000028) __imp__H5P_CLS_OBJECT_COPY_g
H5P.obj : error LNK2020: unresolved token (0A000039) __imp__H5P_CLS_DATATYPE_ACCESS_g
H5P.obj : error LNK2020: unresolved token (0A00003B) __imp__H5P_CLS_OBJECT_CREATE_g
H5T.obj : error LNK2020: unresolved token (0A00000D) __imp__H5T_STD_B32BE_g
H5T.obj : error LNK2020: unresolved token (0A000013) __imp__H5T_NATIVE_B64_g
H5T.obj : error LNK2020: unresolved token (0A000015) __imp__H5T_STD_I64BE_g
H5T.obj : error LNK2020: unresolved token (0A000016) __imp__H5T_NATIVE_DOUBLE_g
H5T.obj : error LNK2020: unresolved token (0A000017) __imp__H5T_NATIVE_B16_g
H5T.obj : error LNK2020: unresolved token (0A000018) __imp__H5T_STD_B16LE_g
H5T.obj : error LNK2020: unresolved token (0A00001B) __imp__H5T_STD_U64BE_g
H5T.obj : error LNK2020: unresolved token (0A00001C) __imp__H5T_STD_B64LE_g
H5T.obj : error LNK2020: unresolved token (0A00001E) __imp__H5T_NATIVE_LDOUBLE_g
H5T.obj : error LNK2020: unresolved token (0A000020) __imp__H5T_STD_I8LE_g

Is there a better way to get around the warning? If not, what am I missing in trying to compile?

Thank you,
John Mulholland | Software Engineer
RSG | http://www.rsginc.com<http://www.rsginc.com/>
41 N Rio Grande Street, Suite 106 | Salt Lake City, UT 84101
Office 801.736.4100 | Direct 801.456.4908 | Fax 801.456.2506

John, glad to hear you got it sorted! G.

···

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of
John Mulholland
Sent: Wednesday, June 19, 2013 11:55 AM
To: HDF Users Discussion List
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

Gerd,

Of course you are correct. The DLLs are only used at run time.

I did find the problem. It was trying to build a 32 bit version and the
libraries I have installed are 64 bit. By changing it to a 64 bit compile
it now works.

Thank you for your help.

John

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of
John Mulholland
Sent: Tuesday, June 18, 2013 1:49 PM
To: HDF Users Discussion List
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

I run the script and get all the linking errors. I also get the same thing
when I try to compile it in visual studio 2012.

John

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of
Gerd Heber
Sent: Tuesday, June 18, 2013 1:47 PM
To: 'HDF Users Discussion List'
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

It doesn't need the DLLs for compiling the assemblies.

What does your output look like?

G.

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of
John Mulholland
Sent: Tuesday, June 18, 2013 2:46 PM
To: HDF Users Discussion List
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

Yes, that is done in the batch file I am using. I am guessing it is finding
the libraries but perhaps not the dlls.

John

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of
Gerd Heber
Sent: Tuesday, June 18, 2013 1:44 PM
To: 'HDF Users Discussion List'
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

You need to set the HDF5_LIB variable (in the script):

SET HDF5_LIB="C:\Program Files\HDF Group\HDF5\1.8.9\lib\hdf5dll.lib"

G.

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of
John Mulholland
Sent: Tuesday, June 18, 2013 2:41 PM
To: HDF Users Discussion List
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

I am thinking it might be a problem with my path as I got a warning about it
when I installed 1.8.9 saying it was too long. I manually added C:\Program
Files\HDF Group\HDF5\1.8.9\bin; to it. Is this correct? Do I need anything
else?

John

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of
John Mulholland
Sent: Tuesday, June 18, 2013 12:45 PM
To: HDF Users Discussion List
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

The flags are in the batch file, which I am running. I am not sure it is
using the correct path to find these. How does it determine the path?

John

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of
Gerd Heber
Sent: Tuesday, June 18, 2013 12:03 PM
To: 'HDF Users Discussion List'
Subject: Re: [Hdf-forum] HDF5 .Net Compile Problems

John, how are you? Have you tried using the doit.*.bat scripts to build the
libraries?

I've seen this error when I was missing a few flags:

/DHDF5_DOT_NET /DHDF5DLL=\"hdf5dll.dll\" /DHDF5HLDLL=\"hdf5_hldll.dll\"

(See the batch files.)

I don't have VS2012 and can't try this, but you don't need that for building

the assemblies anyway.

G.

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of
John Mulholland
Sent: Tuesday, June 18, 2013 10:42 AM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] HDF5 .Net Compile Problems

I have downloaded HDF5.Net have enjoyed using it but I am getting a compile
warning saying there is a processor mismatch between the library (AMD64) and
what I am compiling. My understanding is my best solution to get around
this is to just compile my own libraries. I have downloaded the source code
and have tried compiling both in Visual Studio 2012 and the developer
command prompt. I have not had any success. At first I had errors with
Array which didn't know which overloaded function to use so I specified the
parameter as long long. Now I am having other compile problems such as

Generating Code...

H5P.obj : error LNK2020: unresolved token (0A00000C)
__imp__H5P_CLS_GROUP_ACCESS_g

H5P.obj : error LNK2020: unresolved token (0A000011)
__imp__H5P_CLS_FILE_ACCESS_g

H5P.obj : error LNK2020: unresolved token (0A000012)
__imp__H5P_CLS_DATATYPE_CREATE_g

H5P.obj : error LNK2020: unresolved token (0A000015)
__imp__H5P_CLS_FILE_MOUNT_g

H5P.obj : error LNK2020: unresolved token (0A000016)
__imp__H5P_CLS_DATASET_ACCESS_g

H5P.obj : error LNK2020: unresolved token (0A000017)
__imp__H5P_CLS_FILE_CREATE_g

H5P.obj : error LNK2020: unresolved token (0A000018)
__imp__H5P_CLS_GROUP_CREATE_g

H5P.obj : error LNK2020: unresolved token (0A000019)
__imp__H5P_CLS_LINK_CREATE_g

H5P.obj : error LNK2020: unresolved token (0A00001E)
__imp__H5P_CLS_LINK_ACCESS_g

H5P.obj : error LNK2020: unresolved token (0A000022)
__imp__H5P_CLS_STRING_CREATE_g

H5P.obj : error LNK2020: unresolved token (0A000023)
__imp__H5P_CLS_DATASET_CREATE_g

H5P.obj : error LNK2020: unresolved token (0A000025)
__imp__H5P_CLS_DATASET_XFER_g

H5P.obj : error LNK2020: unresolved token (0A000026)
__imp__H5P_CLS_ATTRIBUTE_CREATE_g

H5P.obj : error LNK2020: unresolved token (0A000027) __imp__H5P_CLS_ROOT_g

H5P.obj : error LNK2020: unresolved token (0A000028)
__imp__H5P_CLS_OBJECT_COPY_g

H5P.obj : error LNK2020: unresolved token (0A000039)
__imp__H5P_CLS_DATATYPE_ACCESS_g

H5P.obj : error LNK2020: unresolved token (0A00003B)
__imp__H5P_CLS_OBJECT_CREATE_g

H5T.obj : error LNK2020: unresolved token (0A00000D) __imp__H5T_STD_B32BE_g

H5T.obj : error LNK2020: unresolved token (0A000013) __imp__H5T_NATIVE_B64_g

H5T.obj : error LNK2020: unresolved token (0A000015) __imp__H5T_STD_I64BE_g

H5T.obj : error LNK2020: unresolved token (0A000016)
__imp__H5T_NATIVE_DOUBLE_g

H5T.obj : error LNK2020: unresolved token (0A000017) __imp__H5T_NATIVE_B16_g

H5T.obj : error LNK2020: unresolved token (0A000018) __imp__H5T_STD_B16LE_g

H5T.obj : error LNK2020: unresolved token (0A00001B) __imp__H5T_STD_U64BE_g

H5T.obj : error LNK2020: unresolved token (0A00001C) __imp__H5T_STD_B64LE_g

H5T.obj : error LNK2020: unresolved token (0A00001E)
__imp__H5T_NATIVE_LDOUBLE_g

H5T.obj : error LNK2020: unresolved token (0A000020) __imp__H5T_STD_I8LE_g

Is there a better way to get around the warning? If not, what am I missing
in trying to compile?

Thank you,

John Mulholland | Software Engineer

RSG | http://www.rsginc.com <http://www.rsginc.com/>

41 N Rio Grande Street, Suite 106 | Salt Lake City, UT 84101

Office 801.736.4100 | Direct 801.456.4908 | Fax 801.456.2506