boost :: archive :: binary_iarchive无效签名

时间:2012-10-31 03:49:45

标签: c++ boost computer-vision boost-serialization

当我使用boost :: archive :: binary_iarchive时,会发生错误:签名无效 当我想编译程序时--cvpr_2012_ffd。你可以从http://blog.gimiatlicho.webfactional.com/?page_id=38获得它。我根据它的自述文件编译程序。当我运行这个程序时遇到一些错误。错误是这个

l00138375@l00138375:/home/hm/downloads/cvpr_2012_public$ ./FaceForest 1      data/config_ffd.txt data/config_headpose.txt data/haarcascade_frontalface_alt.xml
Image pathdata/index_random_subset.txt
paths to treesdata/trees_ffd/
Image path 
paths to treesdata/trees_headpose/tree_
10 to load.
Archive Exception during deserializing:
invalid signature
it was tree: data/trees_headpose/tree_000.txt
segment fault

我发现这个错误出现在文件中:tree.hpp这样的代码

224     //check if file exist
225     std::ifstream ifs(path.c_str());
226     if (!ifs) {
227       std::cout << "Tree not found " << path << std::endl;
228       return false;
229     }
230 
231     //load tree
232     try {
233 //      boost::archive::binary_iarchive ia(ifs);
234       boost::archive::binary_iarchive ia(ifs);
235       ia >> *t;
236     } catch (boost::archive::archive_exception& ex) {
237       std::cout << "Archive Exception during deserializing:" << std::endl;
238       std::cout << ex.what() << std::endl;
239       std::cout << "it was tree: " << path << std::endl;
240     } catch (int e) {
241       std::cout << path << "EXCEPTION " << e << std::endl;
242 
243     }

行中出现错误:234

有人遇到这个错误吗?如何解决这个问题?谢谢

1 个答案:

答案 0 :(得分:3)

我是您尝试编译的程序的作者。 问题是你尝试加载的文件是64位linux / mac二进制文件。

如果您使用的是32位Linux或32/64窗口,则无法加载文件。

如果您需要32位二进制模型,请与我联系。