Por fim, isso pode funcionar, basta substituir native_file_string() por string() .
E por dentro a função basename substituiu return fspath.leaf() por return boost::filesystem::basename(path)
Eu tenho tentado compilar gerador de imagens sem sucesso, já instalei o opencv e impulsionei e criei essenciais (versão do gcc é 4.6.3).
O problema vem quando modificando o Makefile, eu preciso substituir duas variáveis de acordo com o meu sistema.
Originalmente, essas variáveis são assim:
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
Instalei o boost por meio do synaptic (instalei libboost-all-dev ), como posso encontrar os caminhos de instalação para boost e lboost_system-gcc41-mt ?
edit: Depois de fazer um pouco mais de pesquisa, meu Makefile é:
CFLAGS = 'pkg-config --cflags opencv' -I /usr/include/boost -I.
LFLAGS = 'pkg-config --libs opencv' -L /usr/lib -lboost_system-mt -lboost_filesystem-mt
Agora recebi este erro:
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’
Por fim, isso pode funcionar, basta substituir native_file_string() por string() .
E por dentro a função basename substituiu return fspath.leaf() por return boost::filesystem::basename(path)