[solved]commandline_options.cpp

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
Kanapka
Posts: 130
Joined: May 15th, 2010, 2:15 pm
Location: Poland

[solved]commandline_options.cpp

Post by Kanapka »

I had some problems with compiling Wesnoth from svn.

I dowloaded r49832 from SVN and tried to compile it with scons. I got the following message:

Code: Select all

scons: Building targets ...
g++ -o build/release/game.o -c -std=c++98 -pthread -W -Wall -O2 -D_GNU_SOURCE=1 -D_REENTRANT -DHAVE_LIBDBUS -DHAVE_CONFIG_H -D_X11 -DDISABLE_POOL_ALLOC -I/usr/include -I/usr/include/SDL -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/fribidi -I. -Isrc -Isrc/ana/api src/game.cpp
g++ -o build/release/commandline_options.o -c -std=c++98 -pthread -W -Wall -O2 -D_GNU_SOURCE=1 -D_REENTRANT -DHAVE_LIBDBUS -DHAVE_CONFIG_H -D_X11 -I/usr/include -I/usr/include/SDL -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/fribidi -I. -Isrc -Isrc/ana/api src/commandline_options.cpp
src/commandline_options.cpp: In function ‘void validate(boost::any&, const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, two_strings*, int)’:
src/commandline_options.cpp:32: error: ‘invalid_option_value’ is not a member of ‘boost::program_options::validation_error’
scons: *** [build/release/commandline_options.o] Error 1
scons: building terminated because of errors.
I'd be grateful for some information or pointers if it may be caused by my OS or version of Boost.

I also tried some changes to the code:
Spoiler:
System Monitor says my OS is Ubuntu 10.4 (lucid) with Kernel Linux 2.6.32-31-generic
I downloaded the package libboost-all-dev version 1.40.0.1 today (i believe that's where the boost::program_options namespace is, but that's just a wild guess - I found no such namespace in headers included into commandline_options.cpp).
Last edited by Kanapka on June 11th, 2011, 10:06 pm, edited 1 time in total.
User avatar
Zaroth
Inactive Developer
Posts: 75
Joined: January 29th, 2011, 4:33 pm

Re: commandline_options.cpp

Post by Zaroth »

That is because of incompatibility between newer Boost.Program_options versions. The compatibility broke somewhere between 1.40 and 1.42. To make sure it's working, please get boost >=1.42 or wait until a relevant #ifdef is added to the file (AFAIK it's just one line in Wesnoth that's incompatible)

Edit: fix for boost versions <1.42 commited, try compiling latest SVN now.
Kanapka
Posts: 130
Joined: May 15th, 2010, 2:15 pm
Location: Poland

Re: commandline_options.cpp

Post by Kanapka »

I downloaded boost 1.46 and the new version of svn works. Thanks for your help.
Post Reply