Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8436451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:10:54+00:00 2026-06-10T07:10:54+00:00

I have a Visual Studio 2010 C++ project that links statically to tinyxmlSTL 2.5.5

  • 0

I have a Visual Studio 2010 C++ project that links statically to tinyxmlSTL 2.5.5 (tinyxmlSTL.lib) and zlib 1.2.7. (zlibstat.lib). There are 4 builds in total covering both x86 and x64 as well as Debug and Release.

All combinations produce working builds except for Release x64 which gets a bunch of errors like this:

MSVCRT.lib(MSVCR100.dll) : error LNK2005: free already defined in LIBCMT.lib(free.obj)

…and a single warning:

LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library

If I add /NODEFAULTLIB:MSVCRT to linker options for the application then I get this:

zlibstat.lib(ioapi.obj) : error LNK2001: unresolved external symbol __imp__ftelli64
zlibstat.lib(ioapi.obj) : error LNK2001: unresolved external symbol __imp__fseeki64

Basically, all the projects (app and two libs) are set to use Multi-threaded (/MT) option in Release builds and yet x86 builds just fine while x64 suffers from above issues.

Any help or idea is highly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:10:55+00:00Added an answer on June 10, 2026 at 7:10 am

    You need to double check your settings for x64. One of the projects is using the /MD flag rather than /MT.

    As per the MSVC docs, The MSVCRT.lib is invoked by using /MD.

    EDIT :

    As per your comments, it sounds like zlib is the likely culprit.

    zlib has both a static and dll version, but both of these use the /MD flag by default, so unless you changed that while building zlib – that’s your issue.

    To build zlib using /MT:

    1. If you’ve not already done so, install CMake

    2. Download and extract zlib to e.g. C:\devel. The download links are about halfway down the homepage. Currently this provides zlib version 1.2.7.

    3. To work around this CMake bug, add

      if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND MSVC)
        set_target_properties(zlibstatic PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
      endif()
      

      to the end of C:\devel\zlib-1.2.7\CMakeLists.txt

    4. In a VS10 command prompt, cd C:\devel\zlib-1.2.7

    5. cmake -H. -Bbuild -G"Visual Studio 10 Win64"

    This gets you a VS sloution C:\devel\zlib-1.2.7\build\zlib.sln which you can open. Change the settings for the “zlibstatic” target to /MT and /MTd for Release and Debug respectively.

    Building each will yield zlibstatic.lib in a subdirectory of build; either “Release” or “Debug”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my Visual Studio 2010 project I have files with .mm file extension, that
I have a unit test project in Visual Studio 2010 (.NET 4) that utilizes
I have a Visual Studio 2010 project with a Master Page that works fine.
I have a Visual Studio 2010 solution that contains a WCF service project. When
So I have a Visual Studio 2010 project that uses external libraries and in
We have a Visual Studio 2010 project that comprises of a bunch of C
I have a Visual Studio 2010 solution that contains multiple projects. One of these
I have a Visual Studio 2010 solution that contains a class library (ProjectA) and
I have a Visual Studio 2010 C# project which creates an .exe and this
I have a C# application, and a Visual Studio (2010) Setup Project with it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.