[wx-dev] I need help with tests

Manuel Martín mmartin at ceyd.es
Mon Jan 15 11:10:47 PST 2007


Hi, Vadim

I presumed your answer. But it's not so easy.
Because wx's tests needs CppUnit, I downloaded CppUnit and tried to 
compile it.

First try:
I read CppUnit's doc INSTALL-WIN32.txt where I see only MS Visual C++ 6 
or above is supported. Because I only use GNU gcc, I've got a problem. 
Fortunately, I also use CodeBlocks, which has an MS import utility.
But when I try to compile, gcc complains about axfwin.h (and more) not 
found. Sure, they are MFC MSVC-only files, and I don't have them nor 
want to have them.

Second try:
I search in CppUnit wiki about afxwin.h. Nothing found.
I search in CppUnit wiki about MingW compilation. I found something 
about using Eclipse and even QT!
I search google 'cppunit afxwin.h gcc'. Found a big diff file.

Third try:
Perhaps wx's tests just need cppunit's include and source
Try D:\wx280\tests\makefile.gcc with gcc.
Some cppunit/include files not found.

Fourth try:
I set path to D:\cppunit-1.12.0\include and 
D:\cppunit-1.12.0\include\cppunit
I modify D:\wx280\tests\makefile.gcc to include D:\cppunit-1.12.0\include
Try again D:\wx280\tests\makefile.gcc with gcc

D:\wx280\tests>mingw32-make -f makefile.gcc BUILD=debug UNICODE=1 
USE_OPENGL=1 R
UNTIME_LIBS=static
g++ -c -o gcc_mswud\test_dummy.o -g -O0 -mthreads  -DHAVE_W32API_H 
-D__WXMSW__
-D__WXDEBUG__    -D_UNICODE   -I.\..\lib\gcc_lib\mswud -I.\..\include -W 
-Wall -
I D:\cppunit-1.12.0\include -I.  -DwxUSE_GUI=0    -Wno-ctor-dtor-privacy 
   -MTgc
c_mswud\test_dummy.o -MFgcc_mswud\test_dummy.o.d -MD dummy.cpp
In file included from 
D:/cppunit-1.12.0/include/cppunit/extensions/TestFactoryRe
gistry.h:4,
                  from ./../include/wx/cppunit.h:47,
                  from testprec.h:2,
                  from dummy.cpp:28:
D:/cppunit-1.12.0/include/cppunit/Portability.h:18:37: error: 
cppunit/config-aut
o.h: No such file or directory
In file included from D:/cppunit-1.12.0/include/cppunit/TestAssert.h:7,
                  from D:/cppunit-1.12.0/include/cppunit/TestCase.h:6,
                  from ./../include/wx/cppunit.h:49,
                  from testprec.h:2,
                  from dummy.cpp:28:
D:/cppunit-1.12.0/include/cppunit/portability/Stream.h:319:5: error: 
#error Cann
ot define CppUnit::OStringStream.
D:/cppunit-1.12.0/include/cppunit/TestAssert.h: In static member 
function 'stati
c<unnamed>::string assertion_traits<T>::toString(const T&)':
D:/cppunit-1.12.0/include/cppunit/TestAssert.h:48: error: 
'OStringStream' was no
t declared in this scope
D:/cppunit-1.12.0/include/cppunit/TestAssert.h:48: error: expected `;' 
before 'o
st'
D:/cppunit-1.12.0/include/cppunit/TestAssert.h:49: error: 'ost' was not 
declared
  in this scope
D:/cppunit-1.12.0/include/cppunit/extensions/TestFixtureFactory.h: At 
global sco
pe:
D:/cppunit-1.12.0/include/cppunit/extensions/TestFixtureFactory.h:17: 
warning: '
class TestFixtureFactory' has virtual functions but non-virtual destructor
mingw32-make: *** [gcc_mswud\test_dummy.o] Error 1


I give up until someone guides me.
And you still say it's a little effort to make patches?

Manolo





More information about the wx-dev mailing list