Moving wxWidgets project to windows...

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
vsector
In need of some credit
In need of some credit
Posts: 5
Joined: Fri Feb 24, 2012 3:11 am

Moving wxWidgets project to windows...

Post by vsector » Sun Mar 04, 2012 4:40 pm

I was doing some programming in C++ with wxWidgets, when I needed to switch to a windows OS from my linux distro. Because most of the libraries I was using is pretty cross platform, I thought it would be a simple job of simply showing the IDE (code::blocks) where everything was.

But upon trying to compile, I get this error:

Code: Select all

Compiling: Lightfield_RenderingMain.cpp
Compiling: LightField.cpp
In file included from C:\Program Files (x86)\Tools\wxWidgets-2.8.12\include/wx/wx.h:26:0,
*unimportant stuff snipped out*
C:\Program Files (x86)\Tools\wxWidgets-2.8.12\include/wx/app.h:230:59: error: macro "Yield" passed 1 arguments, but takes just 0
C:\Program Files (x86)\Tools\wxWidgets-2.8.12\include/wx/app.h:406:49: error: macro "Yield" passed 1 arguments, but takes just 0
*unimportant snuff*
C:\Program Files (x86)\Tools\wxWidgets-2.8.12\include/wx/msw/app.h:38:49: error: macro "Yield" passed 1 arguments, but takes just 0
*stuff snipped out*
C:\Program Files (x86)\Tools\wxWidgets-2.8.12\include/wx/app.h:230:18: error: function definition does not declare parameters
C:\Program Files (x86)\Tools\wxWidgets-2.8.12\include/wx/app.h:406:53: error: ISO C++ forbids initialization of member 'Yield'
C:\Program Files (x86)\Tools\wxWidgets-2.8.12\include/wx/app.h:406:53: error: making 'Yield' static
C:\Program Files (x86)\Tools\wxWidgets-2.8.12\include/wx/app.h:406:53: error: ISO C++ forbids in-class initialization of non-const static member 'Yield'
C:\Program Files (x86)\Tools\wxWidgets-2.8.12\include/wx/app.h:406:53: error: 'Yield' declared as a 'virtual' field
*stuff snipped out*
C:\Program Files (x86)\Tools\wxWidgets-2.8.12\include/wx/msw/app.h:38:18: error: 'Yield' declared as a 'virtual' field
All the errors are coming from the Yield macro, which I looked at but don't quite know what's wrong.

I think all I had to do with wxWidgets windows installation is run the executable. I've read online there's a post-building process involved, but...

The code was originally on Ubuntu, but I moved it to Windows 7. I'm using Code::Blocks as the IDE, wxWidgets version 2.8.12, and gcc for the compiler.

Edit:

:(, is it that rare?

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Re: Moving wxWidgets project to windows...

Post by Auria » Wed Mar 07, 2012 1:08 am

Before trying to build your own project, can you create a new simple "Hello world" type C::B project with wx and test if it builds and runs fine?
"Keyboard not detected. Press F1 to continue"
-- Windows

Post Reply