fix dynamic linking of test library on windows
This commit is contained in:
@@ -12,8 +12,15 @@ lib libtorrent_test
|
|||||||
setup_transfer.cpp
|
setup_transfer.cpp
|
||||||
dht_server.cpp
|
dht_server.cpp
|
||||||
peer_server.cpp
|
peer_server.cpp
|
||||||
|
|
||||||
: # requirements
|
: # requirements
|
||||||
<library>/torrent//torrent/<link>shared/<boost-link>shared/<export-extra>on
|
<library>/torrent//torrent/<link>shared/<boost-link>shared/<export-extra>on
|
||||||
|
# this is used to determine whether
|
||||||
|
# symbols are exported or imported
|
||||||
|
<link>shared:<define>TORRENT_BUILDING_TEST_SHARED
|
||||||
|
|
||||||
|
: # default build
|
||||||
|
<link>shared
|
||||||
;
|
;
|
||||||
|
|
||||||
project
|
project
|
||||||
|
@@ -35,11 +35,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h> // for exit()
|
#include <stdlib.h> // for exit()
|
||||||
|
#include "setup_transfer.hpp" // for tests_failure
|
||||||
|
|
||||||
int test_main();
|
int test_main();
|
||||||
|
|
||||||
extern bool tests_failure;
|
|
||||||
|
|
||||||
#include "libtorrent/assert.hpp"
|
#include "libtorrent/assert.hpp"
|
||||||
#include "libtorrent/file.hpp"
|
#include "libtorrent/file.hpp"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
@@ -33,6 +33,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
||||||
|
#include "setup_transfer.hpp"
|
||||||
|
|
||||||
#include "libtorrent/session.hpp"
|
#include "libtorrent/session.hpp"
|
||||||
#include "libtorrent/hasher.hpp"
|
#include "libtorrent/hasher.hpp"
|
||||||
#include "libtorrent/http_parser.hpp"
|
#include "libtorrent/http_parser.hpp"
|
||||||
|
@@ -35,6 +35,13 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#include "libtorrent/session.hpp"
|
#include "libtorrent/session.hpp"
|
||||||
#include <boost/tuple/tuple.hpp>
|
#include <boost/tuple/tuple.hpp>
|
||||||
|
#include "libtorrent/config.hpp"
|
||||||
|
|
||||||
|
#ifdef TORRENT_BUILDING_TEST_SHARED
|
||||||
|
#define EXPORT BOOST_SYMBOL_EXPORT
|
||||||
|
#else
|
||||||
|
#define EXPORT BOOST_SYMBOL_IMPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace libtorrent
|
namespace libtorrent
|
||||||
{
|
{
|
||||||
@@ -43,47 +50,51 @@ namespace libtorrent
|
|||||||
struct session_status;
|
struct session_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::auto_ptr<libtorrent::alert> TORRENT_EXPORT wait_for_alert(libtorrent::session& ses, int type);
|
extern EXPORT bool tests_failure;
|
||||||
|
|
||||||
void TORRENT_EXPORT print_ses_rate(float time
|
void EXPORT report_failure(char const* err, char const* file, int line);
|
||||||
|
|
||||||
|
std::auto_ptr<libtorrent::alert> EXPORT wait_for_alert(libtorrent::session& ses, int type);
|
||||||
|
|
||||||
|
void EXPORT print_ses_rate(float time
|
||||||
, libtorrent::torrent_status const* st1
|
, libtorrent::torrent_status const* st1
|
||||||
, libtorrent::torrent_status const* st2
|
, libtorrent::torrent_status const* st2
|
||||||
, libtorrent::torrent_status const* st3 = NULL);
|
, libtorrent::torrent_status const* st3 = NULL);
|
||||||
|
|
||||||
bool TORRENT_EXPORT print_alerts(libtorrent::session& ses, char const* name
|
bool EXPORT print_alerts(libtorrent::session& ses, char const* name
|
||||||
, bool allow_disconnects = false
|
, bool allow_disconnects = false
|
||||||
, bool allow_no_torrents = false
|
, bool allow_no_torrents = false
|
||||||
, bool allow_failed_fastresume = false
|
, bool allow_failed_fastresume = false
|
||||||
, bool (*)(libtorrent::alert*) = 0
|
, bool (*)(libtorrent::alert*) = 0
|
||||||
, bool no_output = false);
|
, bool no_output = false);
|
||||||
|
|
||||||
void TORRENT_EXPORT wait_for_listen(libtorrent::session& ses, char const* name);
|
void EXPORT wait_for_listen(libtorrent::session& ses, char const* name);
|
||||||
void TORRENT_EXPORT test_sleep(int millisec);
|
void EXPORT test_sleep(int millisec);
|
||||||
|
|
||||||
extern boost::detail::atomic_count g_udp_tracker_requests;
|
extern EXPORT boost::detail::atomic_count g_udp_tracker_requests;
|
||||||
extern boost::detail::atomic_count g_http_tracker_requests;
|
extern EXPORT boost::detail::atomic_count g_http_tracker_requests;
|
||||||
|
|
||||||
void TORRENT_EXPORT create_random_files(std::string const& path, const int file_sizes[], int num_files);
|
void EXPORT create_random_files(std::string const& path, const int file_sizes[], int num_files);
|
||||||
|
|
||||||
boost::intrusive_ptr<libtorrent::torrent_info> TORRENT_EXPORT create_torrent(std::ostream* file = 0
|
boost::intrusive_ptr<libtorrent::torrent_info> EXPORT create_torrent(std::ostream* file = 0
|
||||||
, int piece_size = 16 * 1024, int num_pieces = 13, bool add_tracker = true, bool encrypted = false);
|
, int piece_size = 16 * 1024, int num_pieces = 13, bool add_tracker = true, bool encrypted = false);
|
||||||
|
|
||||||
boost::tuple<libtorrent::torrent_handle
|
boost::tuple<libtorrent::torrent_handle
|
||||||
, libtorrent::torrent_handle
|
, libtorrent::torrent_handle
|
||||||
, libtorrent::torrent_handle>
|
, libtorrent::torrent_handle>
|
||||||
TORRENT_EXPORT setup_transfer(libtorrent::session* ses1, libtorrent::session* ses2
|
EXPORT setup_transfer(libtorrent::session* ses1, libtorrent::session* ses2
|
||||||
, libtorrent::session* ses3, bool clear_files, bool use_metadata_transfer = true
|
, libtorrent::session* ses3, bool clear_files, bool use_metadata_transfer = true
|
||||||
, bool connect = true, std::string suffix = "", int piece_size = 16 * 1024
|
, bool connect = true, std::string suffix = "", int piece_size = 16 * 1024
|
||||||
, boost::intrusive_ptr<libtorrent::torrent_info>* torrent = 0, bool super_seeding = false
|
, boost::intrusive_ptr<libtorrent::torrent_info>* torrent = 0, bool super_seeding = false
|
||||||
, libtorrent::add_torrent_params const* p = 0, bool stop_lsd = true, bool encrypted_torrent = false);
|
, libtorrent::add_torrent_params const* p = 0, bool stop_lsd = true, bool encrypted_torrent = false);
|
||||||
|
|
||||||
int TORRENT_EXPORT start_web_server(bool ssl = false, bool chunked = false);
|
int EXPORT start_web_server(bool ssl = false, bool chunked = false);
|
||||||
void TORRENT_EXPORT stop_web_server();
|
void EXPORT stop_web_server();
|
||||||
int TORRENT_EXPORT start_proxy(int type);
|
int EXPORT start_proxy(int type);
|
||||||
void TORRENT_EXPORT stop_proxy(int port);
|
void EXPORT stop_proxy(int port);
|
||||||
|
|
||||||
void TORRENT_EXPORT stop_tracker();
|
void EXPORT stop_tracker();
|
||||||
int TORRENT_EXPORT start_tracker();
|
int EXPORT start_tracker();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -71,11 +71,11 @@ namespace libtorrent {
|
|||||||
TORRENT_EXPORT std::string sanitize_path(std::string const& p);
|
TORRENT_EXPORT std::string sanitize_path(std::string const& p);
|
||||||
|
|
||||||
#ifndef TORRENT_DISABLE_DHT
|
#ifndef TORRENT_DISABLE_DHT
|
||||||
namespace dht
|
// namespace dht
|
||||||
{
|
// {
|
||||||
TORRENT_EXPORT libtorrent::dht::node_id generate_id_impl(
|
// TORRENT_EXPORT libtorrent::dht::node_id generate_id_impl(
|
||||||
address const& ip_, boost::uint32_t r);
|
// address const& ip_, boost::uint32_t r);
|
||||||
}
|
// }
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user