Author Topic: Compile wxWidgets 2.6.2 with C:B-mingw  (Read 7793 times)

Offline mosfet

  • Multiple posting newcomer
  • *
  • Posts: 23
Compile wxWidgets 2.6.2 with C:B-mingw
« on: November 13, 2005, 11:24:57 pm »
Hi,

I tried to compile wxWidgets 2.6.2 by importing and modifying a VS project (removing of .rc). It works almost fine but I only have a problem with the wx_core project.
To reproduce the problem, please download the attached file, and decompress it into wxWidgets-2.6.2/build/msw.
Open wx.workspace with CodeBlocks and Go to Build menu and click on Build Workspace.



here is the log :

Project   : wx_core
Compiler  : GNU GCC Compiler (called directly)
Directory : D:\Logiciels\wxWidgets-2.6.2\build\msw\
--------------------------------------------------------------------------------
Switching to target: Win32 Release
Compiling: ..\..\src\generic\accel.cpp
..\..\src\generic\accel.cpp:89: error: redefinition of `wxAcceleratorTable::wxAcceleratorTable()'
../../include/wx/msw/accel.h:27: error: `wxAcceleratorTable::wxAcceleratorTable()' previously defined here
..\..\src\generic\accel.cpp:109: error: definition of implicitly-declared `virtual wxAcceleratorTable::~wxAcceleratorTable()'
..\..\src\generic\accel.cpp:122: error: no `void wxAcceleratorTable::Add(const wxAcceleratorEntry&)' member function declared in class `wxAcceleratorTable'
..\..\src\generic\accel.cpp:134: error: no `void wxAcceleratorTable::Remove(const wxAcceleratorEntry&)' member function declared in class `wxAcceleratorTable'
..\..\src\generic\accel.cpp:166: error: no `const wxAcceleratorEntry* wxAcceleratorTable::GetEntry(const wxKeyEvent&) const' member function declared in class `wxAcceleratorTable'
..\..\src\generic\accel.cpp:199: error: no `wxMenuItem* wxAcceleratorTable::GetMenuItem(const wxKeyEvent&) const' member function declared in class `wxAcceleratorTable'
..\..\src\generic\accel.cpp: In member function `wxMenuItem* wxAcceleratorTable::GetMenuItem(const wxKeyEvent&) const':
..\..\src\generic\accel.cpp:200: error: `GetEntry' undeclared (first use this function)
..\..\src\generic\accel.cpp:200: error: (Each undeclared identifier is reported only once for each function it appears in.)
..\..\src\generic\accel.cpp: At global scope:
..\..\src\generic\accel.cpp:206: error: no `int wxAcceleratorTable::GetCommand(const wxKeyEvent&) const' member function declared in class `wxAcceleratorTable'
..\..\src\generic\accel.cpp: In member function `int wxAcceleratorTable::GetCommand(const wxKeyEvent&) const':
..\..\src\generic\accel.cpp:207: error: `GetEntry' undeclared (first use this function)
..\..\src\generic\accel.cpp: At global scope:
..\..\src\generic\accel.cpp:213: error: no `wxObjectRefData* wxAcceleratorTable::CreateRefData() const' member function declared in class `wxAcceleratorTable'
..\..\src\generic\accel.cpp:218: error: no `wxObjectRefData* wxAcceleratorTable::CloneRefData(const wxObjectRefData*) const' member function declared in class `wxAcceleratorTable'
Process terminated with status 1 (0 minutes, 5 seconds)
13 errors, 0 warnings




[attachment deleted by admin]

Offline marfi

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Compile wxWidgets 2.6.2 with C:B-mingw
« Reply #1 on: November 14, 2005, 09:59:03 am »
Hi,

this problem is caused by bug(?) in MSVC project converter; C:B imports into new project ALL files mentioned in a source MSVC project even if the imported files belongs to various compile targets. As a result, new created project contains redundant files which lead to the problem you have described. Try to compile wxWidgets library from command line (use makefile.gcc) (another way to fix the problem is an examination of makefile.gcc file and a determination which files should be included in a C:B proect, and which not).

cherokee

  • Guest
Re: Compile wxWidgets 2.6.2 with C:B-mingw
« Reply #2 on: November 14, 2005, 10:03:25 am »
I had encounter this problem few days ago:
http://forums.codeblocks.org/index.php/topic,1198.0.html

cherokee

  • Guest
Re: Compile wxWidgets 2.6.2 with C:B-mingw
« Reply #3 on: November 14, 2005, 10:06:27 am »
and, the other way, edit the file wx_core.cbp manully,  delete files in folder generic && univ will resolve this problem.

Offline marfi

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Compile wxWidgets 2.6.2 with C:B-mingw
« Reply #4 on: November 14, 2005, 12:31:11 pm »
and, the other way, edit the file wx_core.cbp manully,  delete files in folder generic && univ will resolve this problem.

I'm affraid that this solution doesn't work. I have already tried it and I received number of "unresolved external symbol" errors (it looks like non-universal build target also uses some files from "generic" and "univ" folders).

But compilation using "mingw32-make.exe -f makefile.gcc" works fine...  :D (don't forget to configure compilation process in "config.gcc" file...)
« Last Edit: November 14, 2005, 12:45:48 pm by marfi »

josemarin

  • Guest
Re: Compile wxWidgets 2.6.2 with C:B-mingw
« Reply #5 on: November 18, 2005, 11:46:23 am »
> (don't forget to configure compilation process in "config.gcc" file...)

Hi.

On this file (config.gcc) I can configure things like Release/Debug version, modules included, etc?

I have a executable size problem, and maybe this file it's a good place to check.

Thanks!

Jose