Ben Boost Gzip filtreleri sayfasından örnek derlemek çalışıyorum: hata verir ++Boost Gzip filtreler: failes derlemek
Ne yazık ki#include <fstream>
#include <iostream>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filter/gzip.hpp>
int main()
{
using namespace std;
ifstream file("hello.gz", ios_base::in | ios_base::binary);
filtering_streambuf<input> in;
in.push(gzip_decompressor());
in.push(file);
boost::iostreams::copy(in, cout);
}
benim g:
gzlib.cpp: In function ‘int main()’:
gzlib.cpp:12:3: error: ‘filtering_streambuf’ was not declared in this scope
gzlib.cpp:12:23: error: ‘input’ was not declared in this scope
gzlib.cpp:12:30: error: ‘in’ was not declared in this scope
gzlib.cpp:13:29: error: ‘gzip_decompressor’ was not declared in this scope
Bunun fonksiyonu ve nasıl yanlış olan çalışmasını sağlamak için değiştir Çok teşekkürler!
Bağlantı Gzip filtreleri Artıracak: http://www.boost.org/doc/libs/release/libs/iostreams/doc/classes/gzip.html
Çok fazla hata var, bu yüzden çıktıları çıktıya yapıştırdım. Benim Boost'um yanlış olabilir mi? http://pastebin.com/fG2ZqpaJ – ghostmansd
@ghostmansd: [Burada] belirtildiği gibi (http://www.boost.org/doc/libs/release/libs/iostreams/doc/classes/gzip.html#installation), Bunun çalışması için 'zlib'e bağlanmanız gerekir. 'zlib'' boost' için haricidır, ancak genellikle UNIX sistemlerinde önceden yüklenir ve aksi halde buradan indirebilirsiniz (http://zlib.net/). – Mankarse
-lz kullanarak derledim, ancak yardımcı olmuyor. – ghostmansd