Knights Forum

General Category => Knights Discussion => Topic started by: eerongal on September 30, 2013, 06:04:07 AM

Title: compile error on ubuntu
Post by: eerongal on September 30, 2013, 06:04:07 AM
Hello,

I was trying to set up ubuntu  server with this game for my friends and myself to play on a more local server, however, whenever i try to compile with make, i'm getting the error:

"'Canonical' was not declared in this scope"

from src/rstream/rstream.cpp.

I installed all the listed dependencies on the help page, using sudo apt-get from the standard ubuntu debian repositories. Anyone have any ideas what would be causing this?

Thanks!
Title: Re: compile error on ubuntu
Post by: Stephen on September 30, 2013, 12:00:15 PM
Which Boost version are you using?

Title: Re: compile error on ubuntu
Post by: eerongal on September 30, 2013, 02:16:21 PM
1.48.0.2
Title: Re: compile error on ubuntu
Post by: Stephen on September 30, 2013, 05:27:27 PM
Well, that boost version should be OK. At least, it works fine on my machine :)

It's possible you have an older gcc version which doesn't handle namespaces properly.

Try changing "canonical" to "bfs::canonical" on lines 66 and 121 of src/rstream/rstream.cpp.

If that fixes it, I'll commit the change so that other people don't run into the same problem...
Title: Re: compile error on ubuntu
Post by: eerongal on September 30, 2013, 11:10:02 PM
error: 'canonical' is not a member of 'bfs'


Edit:

Playing around with it some more, i figured out the issue. I had to install the package:

libboost1.48-all-dev

after installing that it all worked fine.
Title: Re: compile error on ubuntu
Post by: Stephen on October 01, 2013, 08:32:45 PM
Hmm. Can't explain that one. If you didn't have boost::filesystem installed then you would have got a different error (something like "couldn't open filesystem.hpp").

Maybe you had the filesystem library from an old version of boost hanging around.

Anyway I'm glad you got it working, and I hope you enjoy the game :)
Title: Re: compile error on ubuntu
Post by: eerongal on October 02, 2013, 02:29:23 PM
Yeah, not sure what was up. I know i had all the dependencies installed, i went through the list three times making sure ALL of them were installed (including the ones listed as optional for knights server), and if i checked the version on all the boost ones i had the same version listed above. Anyways, as i said, installing the above package fixed it, so we're good now :)