[hdf-forum] Static Lib with VS2005
Robert Seip
rhs at sharqblot.com
Mon Oct 20 10:14:50 EDT 2008
Might want to check your compiler switches. I've not built HDF5 with
VS2005, but the default C runtime lib in VS2005 is the dynamic link version,
which is what you're showing below. For statically linked HDF5 in VS2003,
the setting I have is /MLd (debug) or /ML (release). The link below
addresses changing from the VS2005 default to /MT or /MTd. The difference
between /ML and /MT is multi-thread support in /MT, but just be aware that
in VS2003 the flag (at least the one in my build) is /ML flavor. To the
best of my knowledge, MFC does not complicate things here.
Hope this is a help.
http://www.tc.cornell.edu/SoftwarePages/Migrating+to+Visual+Studio+2005+from
+Visual+Studio+.NET+2003.htm
Robert
-----Original Message-----
From: Ray Burkholder [mailto:ray at oneunified.net]
Sent: Saturday, October 18, 2008 10:18 PM
To: hdf-forum at hdfgroup.org
Subject: [hdf-forum] Static Lib with VS2005
I have a VS2005 MFC program in which I'd like to use HDF5. For version
1.9.19, the dll version works, but the static libraries do not. When
linking in I'm getting a variety of LNK2005 errors, ie, some function has
already been defined elsewhere:
56>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _strcspn already defined in
LIBCMTD.lib(strcspn.obj)
Is it possible to link statically with an MFC based program?
Ray.
--
Scanned for viruses & dangerous content at One Unified
<http://www.oneunified.net> and is believed to be clean.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.hdfgroup.org/pipermail/hdf-forum_hdfgroup.org/attachments/20081020/0c4db161/attachment.html>
More information about the Hdf-forum
mailing list