LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   hrktorrent with libtorrent-rasterbar-0.16 (http://www.linuxquestions.org/questions/programming-9/hrktorrent-with-libtorrent-rasterbar-0-16-a-4175447872/)

_gin 01-30-2013 12:40 PM

hrktorrent with libtorrent-rasterbar-0.16
 
Hi guys,

I've been trying to compile hrktorrent (0.3.6 ?) against libtorrent-rasterbar-0.16.7 without success.

Here is the story:

hrktorrent (0.3.5) was released few years ago with libtorrent-rb-0.14.x at its core.

A few days ago, I emailed the author if he has a patch in order to make hrktorrent-0.3.5 compliant with either libtorrent-rb-0.15.x or libtorrent-rb-0.16.x.
Unfortunatly, he hasn't answered yet.

I could find a git repo "https://github.com/jmesmon/hrktorrent" where someone has adjusted the code for libtorrent-rb-0.15 but it doesn't work with libtorrent-rb-0.16.

I get this compiling error:

Code:

core.cpp:266:21: erreur: no match for ‘operator=’ in ‘parms.libtorrent::add_torrent_params::save_path = p’
core.cpp:266:21: note: candidates are:
In file included from /usr/lib64/gcc/x86_64-slackware-linux/4.7.2/../../../../include/c++/4.7.2/string:54:0,
                from /usr/lib64/gcc/x86_64-slackware-linux/4.7.2/../../../../include/c++/4.7.2/bits/locale_classes.h:42,
                from /usr/lib64/gcc/x86_64-slackware-linux/4.7.2/../../../../include/c++/4.7.2/bits/ios_base.h:43,
                from /usr/lib64/gcc/x86_64-slackware-linux/4.7.2/../../../../include/c++/4.7.2/ios:43,
                from /usr/lib64/gcc/x86_64-slackware-linux/4.7.2/../../../../include/c++/4.7.2/ostream:40,
                from /usr/lib64/gcc/x86_64-slackware-linux/4.7.2/../../../../include/c++/4.7.2/iostream:40,
                from hrktorrent.h:4,
                from core.cpp:1:

Since I can't program, I can't fix this.

Does anyone has a solution and/or explain why the compilator is complaining ?

Here is where the problem lays

Code:

try {
                libtorrent::add_torrent_params parms;

                boost::intrusive_ptr<libtorrent::torrent_info> info = new libtorrent::torrent_info(_argv[_argc-1]);
                boost::filesystem::path p(Settings->GetS("downloaddir"));
                boost::filesystem::create_directory(p);
                if(!boost::filesystem::exists(p)) {
                        std::cerr << "Download directory does not exist/could not be created." << std::endl;
                        return EXIT_FAILURE;
                }

                parms.save_path = p;        // here is the line at fault
                parms.ti = info;
                parms.paused = false;

                _torrent = _session->add_torrent(parms);
        } catch(std::exception& e) {
                std::cerr << "Could not add torrent (" << e.what() <<")" << std::endl;
                return EXIT_FAILURE;
        }



All times are GMT -5. The time now is 09:18 PM.