Page 1 of 2

Compile Error

Posted: 06 Jul 2008, 17:10
by Crank
Hey im kinda new around here, but I just went to compile using the code::blocks tutorial and got the following error in log.cpp

Compiling: src\log.cpp
src\log.cpp: In member function `void Logger::log(const char*, ...)':
src\log.cpp:81: error: `gettimeofday' was not declared in this scope
src\log.cpp:81: warning: unused variable 'gettimeofday'

Process terminated with status 1 (0 minutes, 3 seconds)
1 errors, 1 warnings

I searched the forums for a bit and did not find any fixes to the problem. I checked and I have the dev package with all the paths set correctly.

Thank you.

Re: Compile Error

Posted: 06 Jul 2008, 17:41
by Crush
It seems like are using a very old version of MinGW, the compiler suite used by Code::Blocks.

Re: Compile Error

Posted: 06 Jul 2008, 17:49
by Crank
Thanks for the speedy reply. I downloaded the latest mingw runtime and extracted the files into my include folder. This seemed to have fixed the problem. But now, when I tried to compile, I got a ton of errors. Here is the log:

Code: Select all

Linking executable: tmw.exe
C:\Program Files\CodeBlocks\MinGW\bin\ld.exe: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs./mingw/lib/crt2.o:crt1.c:(.text+0x167): undefined reference to `___cpu_features_init'
.objs\src\graphics.o:graphics.cpp:(.rdata$_ZTV8Graphics[vtable for Graphics]+0x48): undefined reference to `gcn::Graphics::drawText(std::string const&, int, int, gcn::Graphics::Alignment)'
.objs\src\gui\box.o:box.cpp:(.rdata$_ZTV3Box[vtable for Box]+0x14): undefined reference to `gcn::Widget::drawFrame(gcn::Graphics*)'
.objs\src\gui\box.o:box.cpp:(.rdata$_ZTV3Box[vtable for Box]+0x54): undefined reference to `gcn::Widget::isModalFocused() const'
.objs\src\gui\box.o:box.cpp:(.rdata$_ZTV3Box[vtable for Box]+0x58): undefined reference to `gcn::Widget::isModalMouseInputFocused() const'
.objs\src\gui\box.o:box.cpp:(.rdata$_ZTV3Box[vtable for Box]+0x88): undefined reference to `gcn::Widget::showPart(gcn::Rectangle)'
.objs\src\gui\box.o:box.cpp:(.rdata$_ZTV3Box[vtable for Box]+0xa0): undefined reference to `gcn::Container::findWidgetById(std::string const&)'
.objs\src\gui\box.o:box.cpp:(.rdata$_ZTV3Box[vtable for Box]+0xbc): undefined reference to `non-virtual thunk to gcn::BasicContainer::death(gcn::Event const&)'
.objs\src\gui\browserbox.o:browserbox.cpp:(.rdata$_ZTV10BrowserBox[vtable for BrowserBox]+0x14): undefined reference to `gcn::Widget::drawFrame(gcn::Graphics*)'
.objs\src\gui\browserbox.o:browserbox.cpp:(.rdata$_ZTV10BrowserBox[vtable for BrowserBox]+0x54): undefined reference to `gcn::Widget::isModalFocused() const'
.objs\src\gui\browserbox.o:browserbox.cpp:(.rdata$_ZTV10BrowserBox[vtable for BrowserBox]+0x58): undefined reference to `gcn::Widget::isModalMouseInputFocused() const'
.objs\src\gui\browserbox.o:browserbox.cpp:(.rdata$_ZTV10BrowserBox[vtable for BrowserBox]+0x88): undefined reference to `gcn::Widget::showPart(gcn::Rectangle)'
.objs\src\gui\button.o:button.cpp:(.text+0x549): undefined reference to `gcn::Widget::setFrameSize(unsigned int)'
.objs\src\gui\button.o:button.cpp:(.text+0xed8): undefined reference to `gcn::Exception::Exception(std::string const&, std::string const&, std::string const&, unsigned int)'
.objs\src\gui\button.o:button.cpp:(.rdata$_ZTV6Button[vtable for Button]+0x14): undefined reference to `gcn::Widget::drawFrame(gcn::Graphics*)'
.objs\src\gui\button.o:button.cpp:(.rdata$_ZTV6Button[vtable for Button]+0x54): undefined reference to `gcn::Widget::isModalFocused() const'
.objs\src\gui\button.o:button.cpp:(.rdata$_ZTV6Button[vtable for Button]+0x58): undefined reference to `gcn::Widget::isModalMouseInputFocused() const'
.objs\src\gui\button.o:button.cpp:(.rdata$_ZTV6Button[vtable for Button]+0x88): undefined reference to `gcn::Widget::showPart(gcn::Rectangle)'
.objs\src\gui\button.o:button.cpp:(.rdata$_ZTV6Button[vtable for Button]+0xbc): undefined reference to `non-virtual thunk to gcn::Button::mouseEntered(gcn::MouseEvent&)'
.objs\src\gui\button.o:button.cpp:(.rdata$_ZTV6Button[vtable for Button]+0xc0): undefined reference to `non-virtual thunk to gcn::Button::mouseExited(gcn::MouseEvent&)'
.objs\src\gui\button.o:button.cpp:(.rdata$_ZTV6Button[vtable for Button]+0xc4): undefined reference to `non-virtual thunk to gcn::Button::mousePressed(gcn::MouseEvent&)'
.objs\src\gui\button.o:button.cpp:(.rdata$_ZTV6Button[vtable for Button]+0xc8): undefined reference to `non-virtual thunk to gcn::Button::mouseReleased(gcn::MouseEvent&)'
.objs\src\gui\button.o:button.cpp:(.rdata$_ZTV6Button[vtable for Button]+0xdc): undefined reference to `non-virtual thunk to gcn::Button::mouseDragged(gcn::MouseEvent&)'
.objs\src\gui\button.o:button.cpp:(.rdata$_ZTV6Button[vtable for Button]+0xf0): undefined reference to `non-virtual thunk to gcn::Button::keyPressed(gcn::KeyEvent&)'
.objs\src\gui\button.o:button.cpp:(.rdata$_ZTV6Button[vtable for Button]+0xf4): undefined reference to `non-virtual thunk to gcn::Button::keyReleased(gcn::KeyEvent&)'
.objs\src\gui\button.o:button.cpp:(.rdata$_ZTV6Button[vtable for Button]+0x10c): undefined reference to `non-virtual thunk to gcn::Button::focusLost(gcn::Event const&)'
.objs\src\gui\buy.o:buy.cpp:(.text+0x122b): undefined reference to `gcn::ScrollArea::setHorizontalScrollPolicy(gcn::ScrollArea::ScrollPolicy)'
.objs\src\gui\buy.o:buy.cpp:(.text+0x139f): undefined reference to `gcn::ListBox::addSelectionListener(gcn::SelectionListener*)'
.objs\src\gui\buy.o:buy.cpp:(.text+0x2add): undefined reference to `gcn::ScrollArea::setHorizontalScrollPolicy(gcn::ScrollArea::ScrollPolicy)'
.objs\src\gui\buy.o:buy.cpp:(.text+0x2c51): undefined reference to `gcn::ListBox::addSelectionListener(gcn::SelectionListener*)'
.objs\src\gui\buy.o:buy.cpp:(.text+0x37d9): undefined reference to `gcn::ListBox::getSelected() const'
.objs\src\gui\buy.o:buy.cpp:(.text+0x3b58): undefined reference to `gcn::ListBox::getSelected() const'
.objs\src\gui\buy.o:buy.cpp:(.rdata$_ZTV9BuyDialog[vtable for BuyDialog]+0x14): undefined reference to `gcn::Widget::drawFrame(gcn::Graphics*)'
.objs\src\gui\buy.o:buy.cpp:(.rdata$_ZTV9BuyDialog[vtable for BuyDialog]+0x54): undefined reference to `gcn::Widget::isModalFocused() const'
.objs\src\gui\buy.o:buy.cpp:(.rdata$_ZTV9BuyDialog[vtable for BuyDialog]+0x58): undefined reference to `gcn::Widget::isModalMouseInputFocused() const'
.objs\src\gui\buy.o:buy.cpp:(.rdata$_ZTV9BuyDialog[vtable for BuyDialog]+0x88): undefined reference to `gcn::Widget::showPart(gcn::Rectangle)'
.objs\src\gui\buy.o:buy.cpp:(.rdata$_ZTV9BuyDialog[vtable for BuyDialog]+0xa0): undefined reference to `gcn::Container::findWidgetById(std::string const&)'
.objs\src\gui\buy.o:buy.cpp:(.rdata$_ZTV9BuyDialog[vtable for BuyDialog]+0xe0): undefined reference to `non-virtual thunk to gcn::BasicContainer::death(gcn::Event const&)'
.objs\src\gui\buysell.o:buysell.cpp:(.rdata$_ZTV13BuySellDialog[vtable for BuySellDialog]+0x14): undefined reference to `gcn::Widget::drawFrame(gcn::Graphics*)'
.objs\src\gui\buysell.o:buysell.cpp:(.rdata$_ZTV13BuySellDialog[vtable for BuySellDialog]+0x54): undefined reference to `gcn::Widget::isModalFocused() const'
.objs\src\gui\buysell.o:buysell.cpp:(.rdata$_ZTV13BuySellDialog[vtable for BuySellDialog]+0x58): undefined reference to `gcn::Widget::isModalMouseInputFocused() const'
.objs\src\gui\buysell.o:buysell.cpp:(.rdata$_ZTV13BuySellDialog[vtable for BuySellDialog]+0x88): undefined reference to `gcn::Widget::showPart(gcn::Rectangle)'
.objs\src\gui\buysell.o:buysell.cpp:(.rdata$_ZTV13BuySellDialog[vtable for BuySellDialog]+0xa0): undefined reference to `gcn::Container::findWidgetById(std::string const&)'
.objs\src\gui\buysell.o:buysell.cpp:(.rdata$_ZTV13BuySellDialog[vtable for BuySellDialog]+0xdc): undefined reference to `non-virtual thunk to gcn::BasicContainer::death(gcn::Event const&)'
.objs\src\gui\changeemaildialog.o:changeemaildialog.cpp:(.rdata$_ZTV17ChangeEmailDialog[vtable for ChangeEmailDialog]+0x14): undefined reference to `gcn::Widget::drawFrame(gcn::Graphics*)'
.objs\src\gui\changeemaildialog.o:changeemaildialog.cpp:(.rdata$_ZTV17ChangeEmailDialog[vtable for ChangeEmailDialog]+0x54): undefined reference to `gcn::Widget::isModalFocused() const'
.objs\src\gui\changeemaildialog.o:changeemaildialog.cpp:(.rdata$_ZTV17ChangeEmailDialog[vtable for ChangeEmailDialog]+0x58): undefined reference to `gcn::Widget::isModalMouseInputFocused() const'
.objs\src\gui\changeemaildialog.o:changeemaildialog.cpp:(.rdata$_ZTV17ChangeEmailDialog[vtable for ChangeEmailDialog]+0x88): undefined reference to `gcn::Widget::showPart(gcn::Rectangle)'
.objs\src\gui\changeemaildialog.o:changeemaildialog.cpp:(.rdata$_ZTV17ChangeEmailDialog[vtable for ChangeEmailDialog]+0xa0): undefined reference to `gcn::Container::findWidgetById(std::string const&)'
.objs\src\gui\changeemaildialog.o:changeemaildialog.cpp:(.rdata$_ZTV17ChangeEmailDialog[vtable for ChangeEmailDialog]+0xdc): undefined reference to `non-virtual thunk to gcn::BasicContainer::death(gcn::Event const&)'
Process terminated with status 1 (1 minutes, 12 seconds)
50 errors, 1 warnings

Thanks for the help.

Re: Compile Error

Posted: 06 Jul 2008, 18:42
by Rotonen
Guichan version matches the dependency requirements of what you are trying to compile?

Re: Compile Error

Posted: 07 Jul 2008, 02:13
by Crank
EDIT: NVM all that.

Re: Compile Error

Posted: 07 Jul 2008, 04:43
by Crank
I am using the 0.0.1 version from the SVN. I am also using Guichan 8.0 with that.

Re: Compile Error

Posted: 07 Jul 2008, 04:56
by Jaxad0127
Crank wrote:I am using the 0.0.1 version from the SVN. I am also using Guichan 8.0 with that.
Thats the correct version of Guichan. BTW, the version you're compiling is 0.1 (the current release is 0.0.24).

Re: Compile Error

Posted: 07 Jul 2008, 07:13
by Crank
So if im using the correct version of Guichan, then why am I getting errors from button.cpp

Its tons of errors, but I think the compiler limit is set to 50. I am on Vista using the latest Code::Blocks and all the most up to date files provided on this site.

Devs, help?

Re: Compile Error

Posted: 07 Jul 2008, 09:35
by Rotonen
When it comes to compiler errors, only the first one is relevant: anything after that one could be caused by the first one.

Anyway, have you considered http://nightly.themanaworld.org/ ?

Re: Compile Error

Posted: 07 Jul 2008, 11:41
by trapdoor
Those aren't compiler errors, theyre linking errors, its not linking to guichan. The non-virtual thunk error is generally caused by mismatched gcc versions.

--
trapdoor

Re: Compile Error

Posted: 07 Jul 2008, 17:52
by Crank
Ok I am downloading the Nightly Build right now, servers are awfully slow so ill let you know how that works out after work.

Thanks for the replies.

Re: Compile Error

Posted: 07 Jul 2008, 22:38
by Crank
Ok the nightly build is not what im looking for. I want the actual source to work. It seems like Code::Blocks is just causing a lot of trouble for me. I tried opening the Dev C++ project file but there are a ton of missing files. I also tried using the Visual Studio project file in MSVC 2008 Express Edition, but it also says some of the files aren't found or are un-excessable.

So can someone either upload a clean working build of the latest TMW source code including a working .dev project file?

Thank you.

Re: Compile Error

Posted: 07 Jul 2008, 22:53
by Crush
You can either get the sourcecode from the latest stable release on our download page or the latest snapshot from the subversion repository. The SVN URLs are:
https://themanaworld.svn.sourceforge.ne ... anches/0.0 for the current official client.
https://themanaworld.svn.sourceforge.ne ... /tmw/trunk for the client for the new server.

Both the visual studio and the dev cpp file are horribly outdated because we don't have anyone in the development team who uses one of these IDEs anymore. Most of us are building the sourcecode with Code::Blocks or with make.

Re: Compile Error

Posted: 07 Jul 2008, 23:40
by Rotonen
You are also telling your linker to actually link Guichan?

Re: Compile Error

Posted: 08 Jul 2008, 00:39
by Crank
No, should I be?