BooksDB.cpp:148:10: error: no viable conversion from returned value of type 'bool' to function return type 'shared_ptr' return false; ^~~~~ /wrkdirs/usr/ports/deskutils/fbreader/work/FBReader-0.99.6-freebsdport/fbreader/../zlibrary/core/include/shared_ptr.h:57:3: note: candidate constructor not viable: no known conversion from 'bool' to 'Book *' for 1st argument shared_ptr(T *t); ^ /wrkdirs/usr/ports/deskutils/fbreader/work/FBReader-0.99.6-freebsdport/fbreader/../zlibrary/core/include/shared_ptr.h:58:3: note: candidate constructor not viable: no known conversion from 'bool' to 'const shared_ptr &' for 1st argument shared_ptr(const shared_ptr &t); ^ /wrkdirs/usr/ports/deskutils/fbreader/work/FBReader-0.99.6-freebsdport/fbreader/../zlibrary/core/include/shared_ptr.h:59:3: note: candidate constructor not viable: no known conversion from 'bool' to 'const weak_ptr &' for 1st argument shared_ptr(const weak_ptr &t); ^ 1 error generated. --- fbreader/src/database/booksdb/BooksDB.cpp.orig 2014-01-11 12:45:25 UTC +++ fbreader/src/database/booksdb/BooksDB.cpp @@ -145,7 +145,7 @@ shared_ptr BooksDB::loadBook(const std::string & myFindFileId->setFileName(fileName); if (!myFindFileId->run()) { - return false; + return 0; } ((DBIntValue&)*myLoadBook->parameter("@file_id").value()) = myFindFileId->fileId(); shared_ptr reader = myLoadBook->executeReader();