1
當我使用boost :: archive :: binary_iarchive時,發生錯誤:無效簽名 當我想編譯程序時--cvpr_2012_ffd.you可以從http://blog.gimiatlicho.webfactional.com/?page_id=38得到它。我根據它的README編譯程序。當我運行這個程序,我遇到一些和error.The錯誤是這樣boost :: archive :: binary_iarchive無效簽名
[email protected]:/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
不要有人遇到這個錯誤怎麼解決這個問題的感謝
我在一臺linux機器上編譯這個程序,該機器的操作系統是64位。它可以工作。我認爲tree_000.txt可能是64位二進制文件。我想問如何將這個文件轉換爲32位。 – user1111208