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

  • Home
  • SEARCH
  • 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 3667296
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:58:59+00:00 2026-05-19T01:58:59+00:00

I downloaded and compiled CppUnit to compile with Visual Studio 2010. After the conversion,

  • 0

I downloaded and compiled CppUnit to compile with Visual Studio 2010.

After the conversion, I could load the CppUnitLibraries, and it gives me cppunit.lib and cppunit_dll.lib/dll. After copying the headers and libs to a directory, I run this command to get a lot of errors.

I found the conflict of libraries as follows

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

However, the following command doesn’t seem to work.

cl main.cpp complex.cpp testset.cpp /I"C:\CppUnit\include" /link /libpath:"C:\CppUnit\lib" cppunit.lib /NODEFAULTLIB:library

What’s wrong with them?

This is the command that I used for compilation/link.

cl main.cpp complex.cpp testset.cpp /I"C:\CppUnit\include" /link /libpath:"C:\CppUnit\lib" cppunit.lib

This is the error message from VS2010.

cppunit.lib(TestResult.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': 

...

node@@@Z) already defined in LIBCMT.lib(typinfo.obj)
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:lib
rary
main.exe : fatal error LNK1169: one or more multiply defined symbols found

ADDED

The CppUnit provides older version of project file (dsw), so I needed to convert the file to 2010 solution project manually.

For the error, missing /MD for compilation was the source of the problem. For other compilation warning, I needed to add /EHsc parameter.

cl /EHsc /MD /c /I"./CppUnit/include" main.cpp testset.cpp complex.cpp
link /libpath:"CppUnit/lib" main.obj testset.obj complex.obj cppunit.lib /out:cpptest_static.exe
link /libpath:"CppUnit/lib" main.obj testset.obj complex.obj cppunit_dll.lib /out:cpptest_dynamic.exe
  • 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-05-19T01:59:00+00:00Added an answer on May 19, 2026 at 1:59 am

    seems like you compiled CppUnit in debug mode, weheras you’re now compiling your current files in release mode. Those should not be mixed, and that’s what the compiler is telling you.

    The quickest way to resolve this would probably be to use a VS project, and check it’s settings against the project used to compile CppUnit.

    on your edit: you’re also mixing runtime libraries (eg check that both are compiled using the /MD switch aka Multi-Threaded DLL)

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

Sidebar

Related Questions

I downloaded the OpenSSL .NET wrapper on Visual C# 2010 express edition and I
recently I downloaded this open source project and I am trying to compile it.
I downloaded and installed the Aptana Studio free version. But apparently, to install the
We build our cppunit unittests as a dll and load it into TestPlugInRunnerd.exe to
I have compiled wpa_supplicant code downloaded from http://hostap.epitest.fi/wpa_supplicant/ version is 0.7.3. I am getting
I've downloaded LLVM source code and I'm trying to compile it. I've done the
Here's an interesting puzzle. I downloaded Snippet Compiler to try some stuff out, and
I downloaded Hex Workshop, and I was told to read a .dbc file. It
I downloaded Reflector.Net and it's an .Exe outside VS. I remember (last year) when
Having downloaded Pango and GLib from the GTK+ Project's Win32 downloads page and having

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.