problem z wxWidgets

Marcinr mr21 w o2.pl
Czw, 10 Lut 2005, 23:06:15 CET


Witam

Znów mam problem z wxWidgets.
Tworzę nowy projekt w Anjuta -> WxWindows

wklejam kod źródłowy stąd http://www.wxwidgets.org/hworld.txt

konfiguracja i kompilacja wyglądają tak:


[mar w pldmachine wx16]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared 
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared 
libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared 
libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared 
libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for wx-config... /usr/bin/wx-config
checking for wxWindows version >= 2.3.2... yes (version 2.4.2)
checking for gtk-config... /usr/bin/gtk-config
checking for GTK - version >= 1.2.7... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands




[mar w pldmachine wx16]# make
make  all-recursive
make[1]: Wejście do katalogu `/home/mar/Projects/wx16'
Making all in src
make[2]: Wejście do katalogu `/home/mar/Projects/wx16/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/lib/wx/include/base-2.4 
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   -Wall -g  -MT main.o -MD -MP -MF 
".deps/main.Tpo" -c -o main.o main.cc; \
then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f 
".deps/main.Tpo"; exit 1; fi
main.cc:14: error: base class `wxFrame' has incomplete type
main.cc:17: error: parse error before `&' token
main.cc:19: error: `wxCommandEvent' was not declared in this scope
main.cc:19: error: `event' was not declared in this scope
main.cc:19: error: invalid data member initialization
main.cc:19: error: (use `=' to initialize static data members)
main.cc:19: error: variable or field `OnQuit' declared void
main.cc:20: error: `wxCommandEvent' was not declared in this scope
main.cc:20: error: `event' was not declared in this scope
main.cc:20: error: invalid data member initialization
main.cc:20: error: variable or field `OnAbout' declared void
main.cc:31: error: incomplete type `wxFrame' does not have member `
   sm_eventTable'
main.cc:32: error: `wxCommandEventFunction' was not declared in this scope
main.cc:33: error: `wxCommandEventFunction' was not declared in this scope
main.cc: In function `wxApp* wxCreateApp()':
main.cc:36: error: cannot allocate an object of type `MyApp'
main.cc:36: error:   because the following virtual functions are abstract:
/usr/include/wx/app.h:131: error:       virtual int wxAppBase::OnRun()
main.cc: In member function `virtual bool MyApp::OnInit()':
main.cc:40: error: invalid use of undefined type `struct wxPoint'
/usr/include/wx/utils.h:46: error: forward declaration of `struct wxPoint'
main.cc:40: error: `wxSize' undeclared (first use this function)
main.cc:40: error: (Each undeclared identifier is reported only once for 
each
   function it appears in.)
main.cc:41: error: `Show' undeclared (first use this function)
main.cc:42: error: `SetTopWindow' undeclared (first use this function)
main.cc: At global scope:
main.cc:46: error: parse error before `&' token
main.cc:51: error: syntax error before `->' token
main.cc:52: error: syntax error before `->' token
main.cc:53: error: syntax error before `->' token
main.cc:55: error: syntax error before `*' token
main.cc:56: error: syntax error before `->' token
main.cc:58: error: `menuBar' was not declared in this scope
main.cc:58: error: ISO C++ forbids declaration of `SetMenuBar' with no type
main.cc:58: error: `int MyFrame::SetMenuBar' is not a static member of 
`class
   MyFrame'
main.cc:60: error: ISO C++ forbids declaration of `CreateStatusBar' with no
   type
main.cc:61: error: ISO C++ forbids declaration of `SetStatusText' with 
no type
main.cc:61: error: `int MyFrame::SetStatusText' is not a static member of `
   class MyFrame'
main.cc:61: error: invalid conversion from `const char*' to `int'
main.cc:62: error: parse error before `}' token
main.cc:64: error: `wxCommandEvent' was not declared in this scope
main.cc:64: error: parse error before `)' token
main.cc:65: error: no `void MyFrame::OnQuit(...)' member function 
declared in
   class `MyFrame'
main.cc:65: error: declaration of `void MyFrame::OnQuit(...)'
main.cc:19: error: conflicts with previous declaration `int MyFrame::OnQuit'
main.cc: In member function `void MyFrame::OnQuit(...)':
main.cc:66: error: `Close' undeclared (first use this function)
main.cc: At global scope:
main.cc:69: error: `wxCommandEvent' was not declared in this scope
main.cc:69: error: parse error before `)' token
main.cc:70: error: no `void MyFrame::OnAbout(...)' member function 
declared in
   class `MyFrame'
main.cc:70: error: declaration of `void MyFrame::OnAbout(...)'
main.cc:20: error: conflicts with previous declaration `int 
MyFrame::OnAbout'
main.cc: In member function `void MyFrame::OnAbout(...)':
main.cc:72: error: `wxMessageBox' undeclared (first use this function)
make[2]: *** [main.o] Błąd 1
make[2]: Opuszczenie katalogu `/home/mar/Projects/wx16/src'
make[1]: *** [all-recursive] Błąd 1
make[1]: Opuszczenie katalogu `/home/mar/Projects/wx16'
make: *** [all] Błąd 2
[mar w pldmachine wx16]#


Co się dzieje? Dlaczego pokazuje błędy w kodzie z oficjalnej strony 
wxwidgetes?



MarcinR




Więcej informacji o liście dyskusyjnej pld-users-pl