Because want to use the day before yesterday to buy a small board run a bt download film, Think of a BT software, online look like libtorrent relatively simple, first come to him
Libtorrent down first, because libtorrent depended on libsigc++2.0.x, so began to put down a libsigc++2.0.1
You have to compile the sigc++2.0.1 and run into a type-redefined error,
Usr/include/sigc++-2.0/sigc++/signal.h:1675:error:declaration of ' typedef struct sigc::slot_list<sigc::slot< T_return, Sigc::nil, Sigc::nil, Sigc::nil, Sigc::nil, Sigc::nil, Sigc::nil, sigc::nil> > Sigc::signal0<T_ return, T_accumulator>::slot_list '
/usr/include/sigc++-2.0/sigc++/signal.h:168:error:changes meaning of ' slot_list ' from ' struct sigc::slot_list< Sigc::slot<t_return, Sigc::nil, Sigc::nil, Sigc::nil, Sigc::nil, Sigc::nil, Sigc::nil, sigc::nil> > '
This error, also many people on the network, I first use the sigc++2.0.1 version, signal.h No one said this sigc_typedef_redefine_allowed settings,
So for a long time, everywhere add #undef sigc_typedef_redefine_allowed are not good, and then see people say in later versions to fix this error, on the last version of 2.0,
After sigc++2.0.18,./autogen.sh, in Signal.h.
Plus #undef sigc_typedef_redefine_allowed,
Make again, sure enough, by compiling.
and then run in the Libtorrent directory:./autogen./configure, the result prompts sigc++ or can't find,
later remembered just sigc++ last make install, prompted not permission to write/usr/ Lib what directory of the
and check the data, said that you can pass./configure--prefix=/home, etc. to change the installation directory, hurriedly to the libsigc++ directory with this command to reset the installation directory,
and then directly make install, Because made just now, very quickly, then he will copy Lib to/home/lib, is the installation directory that you just set up.
Then go to the Libtorrent directory and then configure, the result is not found, strange, his text prompts to set the Pkg_config_path this path
on the use of export pkg_config_path=$ pkg_config_path:/home/lib/pkgconfig Add the Pkgconfig path of your installation directory to his search path
You can also use echo $PKG _config_path to see if it's right, Linux also often use this to set the path, such as Ld_library_path What's
in the./configure, wow, successful, next to compile libtorrent
Compile prompt error
File_list_ Iterator.h:64:error: ' ABS ' is not ' a ' std '
with this error message Google gets the patch
http://libtorrent.rakshasa.no/ Attachment/ticket/1266/libtorrent-gcc43-v2.patch
Follow the patch one by one to modify the files mentioned in the compilation is OK
with Linux really rely on Google Ah
The next SimpleClient example, but also compiled, but less code, according to the error one by one to get rid of, after compiling through the
can run.
The following are some of the information that is output at run time,
./simple_client http://imgs.kaicn.com/bt/torrent/20081229/12305450611.torrent
Starting Download. The
finished HTTP download.
Torrent::object::create_string ();
b = Curlget->url (); Http://imgs.kaicn.com/bt/torrent/20081229/12305450611.torrent
Download_add: B.type=4
Hash check completed.
killman.net@720p?? 倁???? 0/1323
It seems that Chinese support is not enough, the next change, but today or the first file to download the tune to say