Linking Error

Ask for help regarding any technical issue or report any bug or OS independent issues.
Post Reply
Retnur
Peon
Peon
Posts: 1
Joined: 23 Oct 2008, 04:08

Linking Error

Post by Retnur »

I've got all the required libraries installed, but I'm getting a linking error after I make on the newest source:
/root/tmw/src/game.cpp:278: undefined reference to `PostHandler::PostHandler()'
/root/tmw/src/game.cpp:278: undefined reference to `PostHandler::PostHandler()'
I can't find that it is defined in the code. (And only 2 or 3 places it's even referenced.)

I have to assume it has to be part of an included library.

Can anyone tell me what this class is and what can I do to clear up this error?
User avatar
Jaxad0127
Manasource
Manasource
Posts: 4209
Joined: 01 Nov 2007, 17:35
Location: Internet

Re: Linking Error

Post by Jaxad0127 »

Retnur wrote:I've got all the required libraries installed, but I'm getting a linking error after I make on the newest source:
/root/tmw/src/game.cpp:278: undefined reference to `PostHandler::PostHandler()'
/root/tmw/src/game.cpp:278: undefined reference to `PostHandler::PostHandler()'
I can't find that it is defined in the code. (And only 2 or 3 places it's even referenced.)

I have to assume it has to be part of an included library.

Can anyone tell me what this class is and what can I do to clear up this error?
Are the files up-to-date?
Image
User avatar
Bjørn
Manasource
Manasource
Posts: 1438
Joined: 09 Dec 2004, 18:50
Location: North Rhine-Westphalia, Germany
Contact:

Re: Linking Error

Post by Bjørn »

Uh, first off, it is really not a good idea to work as root. You don't need to be root to compile TMW, so I would suggest you do so as a normal user. This is because whatever you do as root can affect your whole system, and so it can also potentially mess it up.

In your case, the src/Makefile.am file was out of date and didn't include posthandler.{h,cpp}. I've added these now and committed it in revision 4762. It is common in this project that some files are missing from a build system, since not all developers use the same. Some use cmake, some configure, and some Code::Blocks. We can't all be bothered to keep everything up to date when adding files. So better learn to recognize these kind of errors. :)

Though maybe it would be better if we required everybody to keep at least Makefile.am updated... since it is our primary target and our release mechanism relies on it.
Post Reply