Linking errors : _timezone and oldnames.lib

Hi everyone

I succesfully compile HDF5 1.8.5, but when linking my own app I get :

1>------ Build started: Project: vizir, Configuration: Debug Win32 ------
1>Linking...
1>hdf5.lib(H5Omtime.obj) : error LNK2019: unresolved external symbol
_timezone referenced in function _H5O_mtime_decode
1>oldnames.lib(timezone.obj) : error LNK2001: unresolved external symbol
_timezone
1>oldnames.lib(timezone.obj) : error LNK2001: unresolved external symbol
__timezone
1>C:\Users\Anders\Documents\src32\vizir\Debug\vizir.exe : fatal error
LNK1120: 2 unresolved externals
1>Build log was saved at
"file://c:\Users\Anders\Documents\src32\vizir\vizir.dir\Debug\BuildLog.htm"
1>vizir - 4 error(s), 0 warning(s)
2>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------
2>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 1 skipped ==========

Any ideas ? I'm using MSVC 2008. Does HDF5 use the oldnames library ?

Thanks,
Anders

Anders,

    How did you build the hdf5 library (options, external libraries,..)? I may like to try to duplicate this locally. Also what OS version and is the VS 2008 version express or professional?

Thanks,
     Allen

···

Hi everyone

I succesfully compile HDF5 1.8.5, but when linking my own app I get :

1>------ Build started: Project: vizir, Configuration: Debug Win32 ------
1>Linking...
1>hdf5.lib(H5Omtime.obj) : error LNK2019: unresolved external symbol
_timezone referenced in function _H5O_mtime_decode
1>oldnames.lib(timezone.obj) : error LNK2001: unresolved external symbol
_timezone
1>oldnames.lib(timezone.obj) : error LNK2001: unresolved external symbol
__timezone
1>C:\Users\Anders\Documents\src32\vizir\Debug\vizir.exe : fatal error
LNK1120: 2 unresolved externals
1>Build log was saved at
"file://c:\Users\Anders\Documents\src32\vizir\vizir.dir\Debug\BuildLog.htm"
1>vizir - 4 error(s), 0 warning(s)
2>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------
2>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 1 skipped ==========

Any ideas ? I'm using MSVC 2008. Does HDF5 use the oldnames library ?

Thanks,
Anders

Hi Allen

Thanks for answering - your library suggestion made me examine my own
cmakelists.txt, where I found

IF(WIN32)
SET_TARGET_PROPERTIES(vizir PROPERTIES LINK_FLAGS
"/nodefaultlib:LIBCMT.lib")
ENDIF(WIN32)

Commenting that one out solved the problem; seems a bit obvious now....

My application is a "Multi-threaded Debug DLL (/MDd)" thing, for the
record.

Cheers,
Anders

···

On Tue, Jul 20, 2010 at 3:05 PM, Allen D Byrne <byrn@hdfgroup.org> wrote:

Anders,

   How did you build the hdf5 library (options, external libraries,..)? I
may like to try to duplicate this locally. Also what OS version and is the
VS 2008 version express or professional?

Thanks,
    Allen

> Hi everyone
>
> I succesfully compile HDF5 1.8.5, but when linking my own app I get :
>
> 1>------ Build started: Project: vizir, Configuration: Debug Win32 ------
> 1>Linking...
> 1>hdf5.lib(H5Omtime.obj) : error LNK2019: unresolved external symbol
> _timezone referenced in function _H5O_mtime_decode
> 1>oldnames.lib(timezone.obj) : error LNK2001: unresolved external symbol
> _timezone
> 1>oldnames.lib(timezone.obj) : error LNK2001: unresolved external symbol
> __timezone
> 1>C:\Users\Anders\Documents\src32\vizir\Debug\vizir.exe : fatal error
> LNK1120: 2 unresolved externals
> 1>Build log was saved at
>
"file://c:\Users\Anders\Documents\src32\vizir\vizir.dir\Debug\BuildLog.htm"
> 1>vizir - 4 error(s), 0 warning(s)
> 2>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32
------
> 2>Project not selected to build for this solution configuration
> ========== Build: 0 succeeded, 1 failed, 2 up-to-date, 1 skipped

>
> Any ideas ? I'm using MSVC 2008. Does HDF5 use the oldnames library ?
>
> Thanks,
> Anders
>

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

--

________________________________________________________

Anders Moe

Technical Manager
Geocap
w: +47 22 95 56 66
anders.moe@geocap.no
________________________________________________________