Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: definitelylion on December 23, 2011, 06:36:49 pm

Title: error: definition of static data member 'X::sm_eventTable' of dllimport'd class
Post by: definitelylion on December 23, 2011, 06:36:49 pm
I'm trying to compile C::B SVN trunk with MinGW (gcc 4.6.3) from an MSYS command-line, using the standard method:

Code
$ ./bootstrap
$ ./configure --with-contrib-plugins=all
$ make

What I first saw was this error: http://paste.pocoo.org/raw/524963 (http://paste.pocoo.org/raw/524963)

A little Googling brought me to this forum thread (http://forums.codeblocks.org/index.php?topic=3368.0). Using those modifications I was able to get past the error, only to stumble on a similar one:

Code
annoyingdialog.cpp:26:1: error: definition of static data member 'AnnoyingDialog::sm_eventTable' of dllimport'd class

What am I missing?

annoyingdialog.cpp
Code
25. BEGIN_EVENT_TABLE(AnnoyingDialog, wxScrollingDialog)
26.    EVT_BUTTON(-1, AnnoyingDialog::OnButton)
27. END_EVENT_TABLE()

Thanks!
Title: Re: error: definition of static data member 'X::sm_eventTable' of dllimport'd class
Post by: Alpha on December 23, 2011, 06:53:49 pm
If you are on Windows (which I assume from the use of MSYS), is there a reason you are not compiling Code::Blocks with Code::Blocks (a pre-built nightly)?  (Installing Code::Blocks from source on Windows (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows))