Compile Error

Ask for help regarding any technical issue or report any bug or OS independent issues.
User avatar
Crank
Peon
Peon
Posts: 27
Joined: 06 Jul 2008, 15:54

Compile Error

Post 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.
Call me Crank :3. I am a man, display picture is the misses.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: Compile Error

Post by Crush »

It seems like are using a very old version of MinGW, the compiler suite used by Code::Blocks.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Crank
Peon
Peon
Posts: 27
Joined: 06 Jul 2008, 15:54

Re: Compile Error

Post 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.
Last edited by Crank on 07 Jul 2008, 01:14, edited 1 time in total.
Call me Crank :3. I am a man, display picture is the misses.
User avatar
Rotonen
TMW Adviser
TMW Adviser
Posts: 3154
Joined: 08 Sep 2004, 19:48
Location: Bern, Switzerland

Re: Compile Error

Post by Rotonen »

Guichan version matches the dependency requirements of what you are trying to compile?
This message used to be meaningful.
User avatar
Crank
Peon
Peon
Posts: 27
Joined: 06 Jul 2008, 15:54

Re: Compile Error

Post by Crank »

EDIT: NVM all that.
Call me Crank :3. I am a man, display picture is the misses.
User avatar
Crank
Peon
Peon
Posts: 27
Joined: 06 Jul 2008, 15:54

Re: Compile Error

Post by Crank »

I am using the 0.0.1 version from the SVN. I am also using Guichan 8.0 with that.
Call me Crank :3. I am a man, display picture is the misses.
User avatar
Jaxad0127
Manasource
Manasource
Posts: 4209
Joined: 01 Nov 2007, 17:35
Location: Internet

Re: Compile Error

Post 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).
Image
User avatar
Crank
Peon
Peon
Posts: 27
Joined: 06 Jul 2008, 15:54

Re: Compile Error

Post 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?
Call me Crank :3. I am a man, display picture is the misses.
User avatar
Rotonen
TMW Adviser
TMW Adviser
Posts: 3154
Joined: 08 Sep 2004, 19:48
Location: Bern, Switzerland

Re: Compile Error

Post 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/ ?
This message used to be meaningful.
User avatar
trapdoor
Novice
Novice
Posts: 216
Joined: 18 Feb 2007, 12:36

Re: Compile Error

Post 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
User avatar
Crank
Peon
Peon
Posts: 27
Joined: 06 Jul 2008, 15:54

Re: Compile Error

Post 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.
Call me Crank :3. I am a man, display picture is the misses.
User avatar
Crank
Peon
Peon
Posts: 27
Joined: 06 Jul 2008, 15:54

Re: Compile Error

Post 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.
Call me Crank :3. I am a man, display picture is the misses.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: Compile Error

Post 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.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Rotonen
TMW Adviser
TMW Adviser
Posts: 3154
Joined: 08 Sep 2004, 19:48
Location: Bern, Switzerland

Re: Compile Error

Post by Rotonen »

You are also telling your linker to actually link Guichan?
This message used to be meaningful.
User avatar
Crank
Peon
Peon
Posts: 27
Joined: 06 Jul 2008, 15:54

Re: Compile Error

Post by Crank »

No, should I be?
Call me Crank :3. I am a man, display picture is the misses.
Post Reply