Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Cant get template WxWin project to compile in devC++

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Cant get template WxWin project to compile in devC++
#5602
Posted by: agam3 2004-12-15 07:36:06
How can I get the sample Wxwindows template project to compile and run... See below for details.

I performed the following steps on a Windows 2000 PC.

1) Installed Dev-C++ Version 4.9.9.1 via web download.
2) Started Dev-C++
3) Used the Help->About Dev-C++...->Check for Update utility to install the Image Lib package first. Version 1
4) Once it completed the installation I exited Dev-C++
5) Restarted Dev-C++
6) Used the Help->About Dev-C++...->Check for Update utility to install the WxWindows Dev Pak version 2.29
7) Once it completed the installation I exited Dev-C++
8) Restarted Dev-C++
9) File->New->Project->Gui->WxWindows
10) I saved the project in a folder on my desktop.
11) I went to compile the project (main.cpp) and I keep getting the following compilation errors in the compile log... (I only show the first few compilation errors below)

Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\agam.BBNET\Desktop\wxwin\Makefile.win"
Executing  make...
make.exe -f "C:\Documents and Settings\agam.BBNET\Desktop\wxwin\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/include/c++/3.3.1"  -I"C:/Dev-Cpp/include/c++/3.3.1/mingw32"  -I"C:/Dev-Cpp/include/c++/3.3.1/backward"  -I"C:/Dev-Cpp/lib/gcc-lib/mingw32/3.3.1/include"  -I"C:/Dev-Cpp/include"  

In file included from C:/Dev-Cpp/include/wx/wx.h:15,
                 from main.cpp:5:
C:/Dev-Cpp/include/wx/defs.h:320: error: redeclaration of C++ built-in type `
   bool'

In file included from C:/Dev-Cpp/include/wx/debug.h:17,
                 from C:/Dev-Cpp/include/wx/defs.h:468,
                 from C:/Dev-Cpp/include/wx/wx.h:15,
                 from main.cpp:5:
C:/Dev-Cpp/include/wx/wxchar.h:429:6: #error "Please define string case-insensitive compare for your OS/compiler"
In file included from C:/Dev-Cpp/include/wx/memory.h:20,
                 from C:/Dev-Cpp/include/wx/object.h:20,
                 from C:/Dev-Cpp/include/wx/wx.h:16,
                 from main.cpp:5:
C:/Dev-Cpp/include/wx/string.h:170:4: #error "Please define string case-insensitive compare for your OS/compiler"
In file included from C:/Dev-Cpp/include/wx/memory.h:20,
                 from C:/Dev-Cpp/include/wx/object.h:20,
                 from C:/Dev-Cpp/include/wx/wx.h:16,
                 from main.cpp:5:
C:/Dev-Cpp/include/wx/string.h:419: error: `char wxString::operator[](unsigned
   int) const' and `char wxString::operator[](unsigned int) const' cannot be
   overloaded

C:/Dev-Cpp/include/wx/string.h:423: error: `char& wxString::operator[](unsigned
   int)' and `char& wxString::operator[](unsigned int)' cannot be overloaded

In file included from C:/Dev-Cpp/include/c++/3.3.1/backward/iostream.h:31,
                 from C:/Dev-Cpp/include/wx/memory.h:33,
                 from C:/Dev-Cpp/include/wx/object.h:20,

                 from C:/Dev-Cpp/include/wx/wx.h:16,
                 from main.cpp:5:
C:/Dev-Cpp/include/c++/3.3.1/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
In file included from C:/Dev-Cpp/include/wx/gdicmn.h:29,
                 from C:/Dev-Cpp/include/wx/event.h:23,
                 from C:/Dev-Cpp/include/wx/wx.h:23,
                 from main.cpp:5:
C:/Dev-Cpp/include/wx/font.h:77: error: syntax error before `{' token
C:/Dev-Cpp/include/wx/font.h:90: error: non-member function `bool Ok()' cannot
   have `const' method qualifier
C:/Dev-Cpp/include/wx/font.h: In function `bool Ok()':
C:/Dev-Cpp/include/wx/font.h:90: error: `m_refData' undeclared (first use this
   function)
C:/Dev-Cpp/include/wx/font.h:90: error: (Each undeclared identifier is reported
   only once for each function it appears in.)
C:/Dev-Cpp/include/wx/font.h: At global scope:
C:/Dev-Cpp/include/wx/font.h:93: error: non-member function `bool
   operator==(const wxFont&)' cannot have `const' method qualifier
C:/Dev-Cpp/include/wx/font.h:93: error: `bool operator==(const wxFont&)' must
   take exactly two arguments
C:/Dev-Cpp/include/wx/font.h:94: error: non-member function `bool
   operator!=(const wxFont&)' cannot have `const' method qualifier
C:/Dev-Cpp/include/wx/font.h:94: error: `bool operator!=(const wxFont&)' must
   take exactly two arguments
C:/Dev-Cpp/include/wx/font.h:97: error: virtual outside class declaration
C:/Dev-Cpp/include/wx/font.h:97: error: non-member function `int GetPointSize()
   ' cannot have `const' method qualifier
C:/Dev-Cpp/include/wx/font.h:97: error: function `int GetPointSize()' is
   initialized like a variable
C:/Dev-Cpp/include/wx/font.h:98: error: virtual outside class declaration
C:/Dev-Cpp/include/wx/font.h:98: error: non-member function `int GetFamily()'
   cannot have `const' method qualifier
C:/Dev-Cpp/include/wx/font.h:98: error: function `int GetFamily()' is

   initialized like a variable

C:/Dev-Cpp/include/wx/font.h:99: error: virtual outside class declaration
C:/Dev-Cpp/include/wx/font.h:99: error: non-member function `int GetStyle()'
   cannot have `const' method qualifier

The compile log continues with many more errors along these lines ....
Message2. Re: Cant get template WxWin project to compile in devC++
#5603
Posted by: 2004-12-15 10:24:19
maybe you should try to save your project to a path without spaces...
Message3. Re: Cant get template WxWin project to compile in devC++
#5605
Posted by: agam3 2004-12-15 23:34:01
Saving the project to a directory without spaces in the path did not make the compilation errors go away.

Thanks for the suggestion. The path to the project now has no spaces in it.


Message4. Re: Cant get template WxWin project to compile in devC++
#5617
Posted by: 2004-12-19 12:28:45
I had the same problem with 2.2.9 dev-pak.  The only way I could get the project to compile was to uninstall the dev-pak 2.2.9 and then download dev-pak 2.4.2.  After that, you will have to delete the project and create a new one.  It should work.  2.5.3 is also available but, I prefer 2.4.2.  It seems to be less qwerky and more stable.

A point of note.  You must uninstall 2.2.9.  If you install over it with 2.4.2 or 2.5.3, you will run into vtable reference issues. 
Message5. Re: Cant get template WxWin project to compile in devC++
#5843
Posted by: 2005-02-14 16:54:37
thats the only way? im about to just hack it and fix the errors compiler is giving me.
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2024-12-11  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0