Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've been trying to compile imageclipper unsuccessfully, I've already installed opencv and boost and build-essential (gcc version is 4.6.3).

The problem comes when modifying the Makefile, I need to replace two variables according to my system.

Originally these variables are like this:

CFLAGS = `pkg-config --cflags opencv` -I ~/usr/include/boost-1_36 -I.
LFLAGS = `pkg-config --libs opencv` -L ~/usr/lib -lboost_system-gcc41-mt -lboost_filesystem-gcc41-mt

I installed boost through synaptic (installed libboost-all-dev), how can I find the installation paths to boost and lboost_system-gcc41-mt?

edit: After making a little more of research, my Makefile is:

CFLAGS = `pkg-config --cflags opencv` -I /usr/include/boost -I.
LFLAGS = `pkg-config --libs opencv` -L /usr/lib -lboost_system-mt -lboost_filesystem-mt

Now I got this error:

In file included from imageclipper.cpp:43:0:
filesystem.h: In function ‘std::string fs::realpath(const string&)’:
filesystem.h:60:23: error: ‘class boost::filesystem3::path’ has no member named ‘native_file_string’
filesystem.h: In function ‘std::string fs::dirname(const string&)’:
filesystem.h:66:37: error: ‘class boost::filesystem3::path’ has no member named ‘native_file_string’
filesystem.h: In function ‘std::string fs::basename(const string&)’:
filesystem.h:72:28: error: could not convert ‘boost::filesystem3::path::leaf() const()’ from ‘boost::filesystem3::path’ to ‘std::string {aka std::basic_string<char>}’
filesystem.h: In function ‘std::vector<std::basic_string<char> > fs::filelist(const string&, const std::vector<std::basic_string<char> >&, std::string)’:
filesystem.h:129:44: error: ‘class boost::filesystem3::path’ has no member named ‘native_file_string’
filesystem.h:131:50: error: ‘class boost::filesystem3::path’ has no member named ‘native_file_string’
filesystem.h:133:50: error: ‘class boost::filesystem3::path’ has no member named ‘native_file_string’
filesystem.h:135:50: error: ‘class boost::filesystem3::path’ has no member named ‘native_file_string’
filesystem.h:137:50: error: ‘class boost::filesystem3::path’ has no member named ‘native_file_string’
filesystem.h:139:50: error: ‘class boost::filesystem3::path’ has no member named ‘native_file_string’
share|improve this question

1 Answer 1

Finally could make it work, just needed to replace native_file_string() with string(). And inside basename function replaced return fspath.leaf() with return boost::filesystem::basename(path)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.