[Cppunit-devel] Re: A few notes about my first experience with cppunit.
Brought to you by:
blep
From: Ferdinando A. <ml...@am...> - 2001-07-20 14:21:17
|
Hi all thank you everybody for the feedback to my last email. >I would suggest that you use the CVS version of CppUnit, and keep abreast of >this mailing list, as the API, such as it is, is very fluid at the moment. Ok I checked out the CVS version, I will stay tuned. >When you say "make failed", do you mean that it really stopped with an >error message? Or do you mean that it failed to generate the documentation? It stopped with: Making all in doc make[1]: Entering directory `/cygdrive/e/cppunit-1.5.5/doc' /cygdrive/e/Program Files/doxygen-1.2.8.1/bin/doxygen /cygdrive/e/Program: not found make[1]: *** [html/index.html] Error 127 make[1]: Leaving directory `/cygdrive/e/cppunit-1.5.5/doc' make: *** [all-recursive] Error 1 Anyway it just failed the documentation part. Everything else seems fine, except maybe the following warning: /bin/sh ../../libtool --mode=link c++ -O2 -o libcppunit.la -rpath /usr/local/lib -version-info 5:0:0 -release 1.5 TestAssert.lo TestCase.lo TestSuite.lo TestResult.lo TestFailure.lo TestRegistry.lo Exception.lo TextTestResult.lo TestFactoryRegistry.lo TypeInfoHelper.lo libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries > > I would humbly suggest to have a different directive for document > > generation, something like: > > if DOXYGEN_FOUND > > docs: > > $(DOXYGEN) Doxyfile.in > > else > > docs: > > echo You need to install doxygen in order to generate > > documentation. > > endif > >Hmm, I don't see where things go wrong: if configure cannot detect doxygen >or it has been disabled with '--without-doxygen' the 'doc' subdir will be >excluded from the build, so no attempt to run doxygen will be made. Only if >you explicitly do 'make docs', you'll get an error. The problem is that configure detects my doxygen under E:\Program Files\doxygen, then when make tries to use doxygen it fails because it cannot find E:\Program: I tried to run configure --without-doxygen but I had similar results. Configure prints out: checking for doxygen... /cygdrive/e/Program Files/doxygen-1.2.8.1/bin/doxygen test: Files/doxygen-1.2.8.1/bin/doxygen: unknown operand checking for dot... /cygdrive/e/Program Files/graphviz/bin/dot test: Files/graphviz/bin/dot: unknown operand then make will fail as above while trying to build documentation. So I cannot avoid the documentation step. > > I would humbly suggest to have a different directive for document > > generation, something like: > > if DOXYGEN_FOUND > > docs: > > $(DOXYGEN) Doxyfile.in > > else > >Something similar to this is done. Err, maybe only in CVS, though... Unfortunately cygwin does not include libtool, so I cannot execute the autogen script. I should use a real Linux box, but my Mandrake box is currently down > > 4) It would be nice to have a Win32 binary visual installer. This can be > > easily supported with NSIS (http://www.nullsoft.com/free/nsis/). NSIS is > > free and it is script driven. I could help creating the cppunit installer > > script, if somebody help me to select which *.h is needed, etc. > What would this bring for the user ? I'd rather have a tar ball or a zip >file which I can explore than a big binary platform specific file. End user >of the library are developer, so I don't think they have too much problem >depacking a file ;-) I would like to have a tarball/zipfile *and* a binary installer. With a binary installer I could have started using cppunit in my project immediately (I just need a lib and few header files), then later I could have take a look at the source code. >Feel free to to contribute an NSIS script for installation! I'll try to came up with a proposal > > 2) I opened TestRunner.dsw and I tried to compile the project TestRunner. > > The first errors were because of the inclusion directive > > #include <cppunit/extensions/TestDecorator.h> > > Adding the cppunit/include path to the project didn't help, I had to add >it > > to my VS settings, as if I had installed cppunit (probably because of the ><>) > > Then I got linking errors. If I've been naive please help me (I can post > > the error messages if needed) > Another user have reported having problem compiling cppunit 1.5.5. The >problem did not occur for him using the CVS version. That problem kind of >bother me since it does seem to occurs only for a few people. I've never >been able to reproduce it either at work or at home). What's your >configuration ? My configuration is Pentium III 700Mhz, NT 4.0 (patch 6), Visual C++ 6.0 The link error is: Generating Code... Linking... msvcprt.lib(MSVCP60.dll) : error LNK2005: "private: bool __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE _NI_N@Z) already defined in cppunit.lib(TestSuite.obj) msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in cppunit.lib(TestSuite.obj) msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::assign(class s td::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z) already defined in cppunit.lib(TestSuite. obj) msvcprt.lib(MSVCP60.dll) : error LNK2005: "private: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Copy(unsigned int)" (?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z) already defined in cppunit.lib(TestSuite.obj) msvcprt.lib(MSVCP60.dll) : error LNK2005: "private: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Tidy(bool)" (?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z) alread y defined in cppunit.lib(TestSuite.obj) msvcprt.lib(MSVCP60.dll) : warning LNK4006: "private: bool __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A AE_NI_N@Z) already defined in cppunit.lib(TestSuite.obj); second definition ignored msvcprt.lib(MSVCP60.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_strin g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in cppunit.lib(TestSuite.obj); second definition ignored msvcprt.lib(MSVCP60.dll) : warning LNK4006: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::assign(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z) already defined in cppunit.lib(TestSuit e.obj); second definition ignored msvcprt.lib(MSVCP60.dll) : warning LNK4006: "private: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Copy(unsigned int)" (?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@ Z) already defined in cppunit.lib(TestSuite.obj); second definition ignored msvcprt.lib(MSVCP60.dll) : warning LNK4006: "private: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Tidy(bool)" (?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z) alre ady defined in cppunit.lib(TestSuite.obj); second definition ignored Creating library Release/TestRunner.lib and object Release/TestRunner.exp LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library TestRunnerDlg.obj : error LNK2001: unresolved external symbol __imp__timeGetTime@0 Release/TestRunner.dll : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Using the version under CVS I had no problem with the "Win32 - Debug" and "Win32 - Debug Crossplatform Settings" configurations. "Win32 - Release" fails because it misses ..\..\..\include and ..\..\..\include\msvc6 as additonal include directories. I added them and it worked fine: you may consider fixing this in the CVS version of TestRunner.dsp diff -r1.7 TestRunner.dsp 47c47 < # ADD CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_AFXEXT" /D "WIN32" /Yu"stdafx.h" /FD /c --- > # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /I "..\..\..\include\msvc6" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_AFXEXT" /D "WIN32" /Yu"stdafx.h" /FD /c later ciao -- Nando |