Project

General

Profile

WPdfImage needs a small modification for boost1.46

Added by Rakesh Vidyadharan over 13 years ago

Hello,

I had to make a small modification to WPdfImage.C file to get Wt to build against boost 1.46. The error message with 3.1.8 sources is as below:

/home/rakesh/Downloads/wt-3.1.8/src/Wt/WPdfImage.C: In member function 'void Wt::WPdfImage::matchFont(const Wt::WFont&, const std::vector<std::basic_string >&, const boost::filesystem3::path&, Wt::WPdfImage::FontMatch&) const':

/home/rakesh/Downloads/wt-3.1.8/src/Wt/WPdfImage.C:224:51: error: invalid initialization of reference of type 'const std::string&' from expression of type 'boost::filesystem3::path'

/home/rakesh/Downloads/wt-3.1.8/src/web/Utils.h:43:20: error: in passing argument 1 of 'std::string Wt::Utils::lowerCase(const std::string&)'

The fix is to replace line 224 with

std::string f = Utils::lowerCase(path.filename().string());

Hope this is useful to someone.

Rakesh