No need to answer, i ve solved it.
All works fine
<http://aka.ms/weboutlook>
________________________________
From: Nocs ... <***@hotmail.com>
Sent: Tuesday, May 2, 2017 2:55:58 AM
To: General discussion about libtorrent
Subject: Re: [libtorrent] Compilation Error - Static lib is not working
What wrong am i doing and i cant get it build ?
#pragma comment(lib, "libtorrent.lib")
#pragma comment(lib, "libboost_atomic-vc120-mt-s-1_63.lib")
#pragma comment(lib, "libboost_chrono-vc120-mt-s-1_63.lib")
#pragma comment(lib, "libboost_date_time-vc120-mt-s-1_63.lib")
#pragma comment(lib, "libboost_random-vc120-mt-s-1_63.lib")
#pragma comment(lib, "libboost_system-vc120-mt-s-1_63.lib")
#pragma comment(lib, "zlib.lib")
#pragma comment(lib, "libeay32.lib")
#pragma comment(lib, "ssleay32.lib")
make_torrent.cpp
make_torrent.cpp(73): warning C4244: 'initializing' : conversion from 'std::streamoff' to 'const size_t', possible loss of data
libtorrent.lib(broadcast_socket.obj) : error LNK2001: unresolved external symbol ***@4
E:\MyDocuments\Visual Studio 2013\Projects\Torrent\Torrent\Release\Torrent.exe : fatal error LNK1120: 1 unresolved externals
<http://aka.ms/weboutlook>
i used the make_torrent.cpp from the examples as is just addded the libs and i have this errors now
________________________________
From: Nocs ... <***@hotmail.com>
Sent: Monday, May 1, 2017 10:39:12 PM
To: General discussion about libtorrent
Subject: Re: [libtorrent] Compilation Error - Static lib is not working
Thanks for the response and sorry i didnt understand it was for the project with allready builded lib this definitions.
I update my project with this definitions as follows :
_WIN32_WINNT=0x0501;NDEBUG;TORRENT_DISABLE_LOGGING;TORRENT_NO_DEPRECATE;TORRENT_USE_OPENSSL;UNICODE;_UNICODE;TORRENT_DISABLE_INVARIANT_CHECKS;TORRENT_PRODUCTION_ASSERTS=0;TORRENT_USE_ASSERTS=0;_CONSOLE;_LIB;%(PreprocessorDefinitions)
But i think i didnt manage to make it work and here is my errors :
Source.cpp
Source.obj : error LNK2001: unresolved external symbol "void __cdecl libtorrent::ipv6_nodeprecate_(void)" (?***@libtorrent@@YAXXZ)
Source.obj : error LNK2001: unresolved external symbol "public: void __thiscall libtorrent::session_handle::pop_alerts(class std::vector<class libtorrent::alert *,class std::allocator<class libtorrent::alert *> > *)" (?***@session_handle@libtorrent@@QAEXPAV?$***@PAValert@libtorrent@@V?$***@PAValert@libtorrent@@@std@@@std@@@Z)
Source.obj : error LNK2001: unresolved external symbol "public: struct libtorrent::torrent_handle __thiscall libtorrent::session_handle::add_torrent(struct libtorrent::add_torrent_params const &)" (?***@session_handle@libtorrent@@QAE?***@2@***@2@@Z)
Source.obj : error LNK2001: unresolved external symbol "struct libtorrent::storage_interface * __cdecl libtorrent::default_storage_constructor(struct libtorrent::storage_params const &)" (?***@libtorrent@@***@1@***@1@@Z)
Source.obj : error LNK2001: unresolved external symbol "private: void __thiscall libtorrent::session::start(int,struct libtorrent::settings_pack const &,class boost::asio::io_service *)" (?***@session@libtorrent@@***@2@***@asio@boost@@@Z)
Source.obj : error LNK2001: unresolved external symbol "public: __thiscall libtorrent::session::~session(void)" (??***@libtorrent@@***@XZ)
Source.obj : error LNK2001: unresolved external symbol "void __cdecl libtorrent::parse_magnet_uri(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct libtorrent::add_torrent_params &,class boost::system::error_code &)" (?***@libtorrent@@YAXABV?$***@DU?$***@D@std@@V?$***@D@2@@std@@***@1@***@system@boost@@@Z)
E:\MyDocuments\Visual Studio 2013\Projects\Torrent\Torrent\Release\Torrent.exe : fatal error LNK1120: 7 unresolved externals
Sorry for the trouble but i am not so experienced in compiling and building options.
What can i do about it ? where is the errors coming from ?
if i manage to build any of the examples code i wont think i will need any guidance after
the only problem is to find how to build it once with the statik libs i made and then i can follow the functions manual in libtorrent page
thanks in advance for your time
________________________________
From: sledgehammer999 <***@qbittorrent.org>
Sent: Monday, May 1, 2017 10:43:48 AM
To: General discussion about libtorrent
Subject: Re: [libtorrent] Compilation Error - Static lib is not working
You have built libtorrent with deprecated-functions=off and yet it still
looks for libtorrent::ipv6_deprecated_(void)
Did you forget to use this define while building your
program:TORRENT_NO_DEPRECATE ?
Make the compiler/linker define those.
List of possible defines that need to be present in your program depending
on how you build libtorrent are found here towards the end:
http://libtorrent.org/building.html
2017-05-01 6:53 GMT+03:00 Nocs ... <***@hotmail.com>:
> I cant find anything related to my errors.
> Could someone help how to solve them and be able to start using libtorrent
> ?
>
>
> ________________________________
> From: Nocs ...
> Sent: Sunday, April 30, 2017 10:40:57 AM
> To: General discussion about libtorrent
> Subject: Re: [libtorrent] Compilation Error - Static lib is not working
>
>
> Below is the errors and the way i used to build boost and libtorrent
> latesr versions both of them
>
> i build boost with :
> b2 -q --with-system --toolset=msvc-12.0 variant=release link=static
> runtime-link=static debug-symbols=off warnings=off warnings-as-errors=off
>
> i build libtorrent with :
> ..\boost\b2 -q --prefix="stage" --without-python --toolset=msvc-12.0
> variant=release link=static runtime-link=static dht=on debug-symbols=off
> deprecated-functions=off iconv=auto invariant-checks=off encryption=on
> logging=off crypto=openssl i2p=on character-set=unicode boost-link=static
> -sBOOST_ROOT="E:\MyProj\Libtorrent\TorrentLib\boost"
> include="E:\MyProj\Libtorrent\TorrentLib\install\include"
> library-path="E:\MyProj\Libtorrent\TorrentLib\install\lib" install
>
> I made a new project linked the libs and headers of boost and libtorrent
> and as main.cpp i used a cpp as it was from
> one of your examples folder just copied as is and i get the next errors
> ------- ERRORS
> Source.obj : error LNK2001: unresolved external symbol "void __cdecl
> libtorrent::ipv6_deprecated_(void)" (?***@libtorrent@@YAXXZ)
> Source.obj : error LNK2001: unresolved external symbol "public: void
> __thiscall libtorrent::session_handle::pop_alerts(class std::vector<class
> libtorrent::alert *,class std::allocator<class libtorrent::alert *> > *)"
> (?***@session_handle@libtorrent@@QAEXPAV?$vector@
> ***@libtorrent@@V?$***@PAValert@libtorrent@@@std@@@std@@@Z)
> Source.obj : error LNK2001: unresolved external symbol "public: struct
> libtorrent::torrent_handle __thiscall libtorrent::session_handle::add_torrent(struct
> libtorrent::add_torrent_params const &)" (?***@session_handle@
> libtorrent@@QAE?***@2@***@2@@Z)
> Source.obj : error LNK2001: unresolved external symbol "struct
> libtorrent::storage_interface * __cdecl libtorrent::default_storage_constructor(struct
> libtorrent::storage_params const &)" (?default_storage_constructor@
> libtorrent@@***@1@***@1@@Z)
> Source.obj : error LNK2001: unresolved external symbol "private: void
> __thiscall libtorrent::session::start(int,struct
> libtorrent::settings_pack const &,class boost::asio::io_service *)"
> (?***@session@libtorrent@@***@2@***@asio
> @boost@@@Z)
> Source.obj : error LNK2001: unresolved external symbol "public: __thiscall
> libtorrent::session::~session(void)" (??***@libtorrent@@***@XZ)
> Source.obj : error LNK2001: unresolved external symbol "void __cdecl
> libtorrent::parse_magnet_uri(class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> > const &,struct
> libtorrent::add_torrent_params &,class boost::system::error_code &)"
> (?***@libtorrent@@YAXABV?$***@DU?$***@D@std@
> @V?$***@D@2@@std@@***@1@***@system
> @boost@@@Z)
> E:\MyDocuments\Visual Studio 2013\Projects\Torrent\Torrent\Release\Torrent.exe
> : fatal error LNK1120: 7 unresolved externals
>
> Thanks for your time in advance
>
> <http://aka.ms/weboutlook>
>
> ________________________________
> From: Arvid Norberg <***@gmail.com>
> Sent: Sunday, April 30, 2017 6:38:37 AM
> To: General discussion about libtorrent
> Subject: Re: [libtorrent] Compilation Error - Static lib is not working
>
> On Sat, Apr 29, 2017 at 12:55 PM, Nocs ... <***@hotmail.com> wrote:
>
> > Hello again, i tried twice to send a message including a 6KB .zip file
> > with all the needed txt and sln to check my errors but it returns me
> >
> > a postmaster undeliverable message error back to me if you didnt got the
> 2
> > previous messages please let me know where could i send the zip file with
> > all the errors and txt and sln file (it is just 6KB zip file with all
> > needed inside)
> >
>
> Please just post the relevant parts of the errors. If it's just missing
> symbols, maybe one symbol from each library.
> If you can't tell which library a symbol comes from, one trick is to google
> it and often you'll be able to find out.
>
> --
> Arvid Norberg
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Libtorrent-discuss mailing list
> Libtorrent-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Libtorrent-discuss mailing list
> Libtorrent-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
Libtorrent-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
Libtorrent-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
Libtorrent-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss