I compiled and compiled CppUnit to compile with Visual Studio 2010.
After the conversion, I was able to load CppUnitLibraries and it gives me cppunit.lib and cppunit_dll.lib / dll. After copying the headers and libraries to the directory, I run this command to get a lot of errors.
I found the library conflict as follows
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
However, the following command does not work.
cl main.cpp complex.cpp testset.cpp /I"C:\CppUnit\include" /link /libpath:"C:\CppUnit\lib" cppunit.lib /NODEFAULTLIB:library
What is wrong with them?
This is the command I used to compile / link.
cl main.cpp complex.cpp testset.cpp /I"C:\CppUnit\include" /link /libpath:"C:\CppUnit\lib" cppunit.lib
This is the error message 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
CppUnit (dsw), 2010 .
/MD . /EHsc.
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