Chciałbym pobawić się biblioteką libtorrent Jest to biblioteka która zawiera wszystkie potrzebne rzeczy by stworzyć klienta torrent. Chciałbym skompilować i uruchomić najprostszego klienta jaki jest opisany tutaj Nie mam pojęcia jak to skompilować aby działało. Wiem, że trzeba dodać biblioteki boost oraz (oczywiście [green] ) libtorrent i tak też zrobiłem w Dev C++ z którego korzystam. Nie wiem co dalej mam jeszcze zrobić żeby to skompilować, bo w instrukcji zamieszczonej na ich stronie po prostu się gubie.Czy ktoś się może już tym bawił i mógłby pomóc lub mógłby mi pomóc to uruchomić?
Aktualnie tak wygląda log kompilacji.
Dodaj przestrzenie nazw, lub przed kazda zmianna pisz poprawne odwolanie sie do wnetrz klas boost::(...)
Dodałem przestrzenie nazw, ale nic to nie pomogło.
Dalej te same błędy ? napisz cos wiecej
Nie jestem pewien czy w logu pisało dokładnie to samo co wcześniej, ale był mniej więcej tej samej długości. :-/ Sprawdze jeszcze dokładnie jak będe w domu. Na początku, zaraz po dołączeniu bibliotek dodałem wpisy:
using namespace boost;
using namespace libtorrent;
Później dodam loga kompilacji.
\EDIT
Log przy kompilacji jest identyczny. Dołączam jeszcze kod tego programu który chce skompilować.
#include <iostream>
#include <fstream>
#include <iterator>
#include <iomanip>
#include "libtorrent/entry.hpp"
#include "libtorrent/bencode.hpp"
#include "libtorrent/torrent_info.hpp"
using namespace boost;
using namespace libtorrent;
int main(int argc, char* argv[])
{
using namespace libtorrent;
if (argc != 2)
{
std::cerr << "usage: dump_torrent torrent-file\n";
return 1;
}
try
{
std::ifstream in(argv[1], std::ios_base::binary);
in.unsetf(std::ios_base::skipws);
entry e = bdecode(std::istream_iterator<char>(in)
, std::istream_iterator<char>());
std::cout << "\n\n----- raw info -----\n\n";
e.print(std::cout);
torrent_info t(e);
// print info about torrent
std::cout << "\n\n----- torrent file info -----\n\n";
std::cout << "nodes:\n";
typedef std::vector<std::pair<std::string, int> > node_vec;
node_vec const& nodes = t.nodes();
for (node_vec::const_iterator i = nodes.begin(), end(nodes.end());
i != end; ++i)
{
std::cout << i->first << ":" << i->second << "\n";
}
std::cout << "trackers:\n";
for (std::vector<announce_entry>::const_iterator i
= t.trackers().begin(); i != t.trackers().end(); ++i)
{
std::cout << i->tier << ": " << i->url << "\n";
}
std::cout << "number of pieces: " << t.num_pieces() << "\n";
std::cout << "piece length: " << t.piece_length() << "\n";
std::cout << "info hash: " << t.info_hash() << "\n";
std::cout << "comment: " << t.comment() << "\n";
std::cout << "created by: " << t.creator() << "\n";
std::cout << "files:\n";
for (torrent_info::file_iterator i = t.begin_files();
i != t.end_files(); ++i)
{
std::cout << " " << std::setw(11) << i->size
<< " " << i->path.string() << "\n";
}
}
catch (std::exception& e)
{
std::cout << e.what() << "\n";
}
return 0;
}
Próbuje ciągle od kilku dni i dalej nic. [glowa] Próbowałem też pod linuksem, instalowałem biblioteki boost i libtorrent z paczek ale dalej nie potrafie tego skompilować. Jakieś pomysły?