Results 1 to 3 of 3

Thread: undefined reference to libtorrent

  1. #1
    Join Date
    Mar 2010
    Posts
    92
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default undefined reference to libtorrent

    when i build my source code use libtorrent error message:

    release/main.o:main.cpp: (.text+0x7d7 ) : undefined reference to `libtorrent:: create_torrent::create_torrent(libtorrent::file_st orage&, int)'
    release/main.o:main.cpp: (.text+0x80a ) : undefined reference to `libtorrent:: create_torrent::add_tracker(std::string const&, int)'
    release/main.o:main.cpp : (.text+0x8c9) : undefined reference to `libtorrent:: create_torrent::set_creator(char const*)'
    release/main.o:main.cpp : (.text+0xa89) : undefined reference to `libtorrent: :create_torrent::generate() const'
    release/main.o:main.cpp : (.text+0xab7) : undefined reference to `libtorrent:: entry::destruct()'
    release/main.o:main.cpp : (.text+0xbf7 ): undefined reference to `libtorrent: :create_torrent::add_url_seed(std::string const&)'
    release/main.o:main.cpp .text+0xfe3) : undefined reference to `libtorrent::entry::destruct()'

  2. #2
    Join Date
    Sep 2009
    Posts
    72
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows
    Thanked 10 Times in 10 Posts

    Default Re: undefined reference to libtorrent

    Hi

    Have u added libtorrent library path and name in your .pro file ?

    use
    LIBS += -llibtorrent -L<PATH OF YOUR LIBRARY>

  3. #3
    Join Date
    Mar 2010
    Posts
    92
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: undefined reference to libtorrent

    but i dont known Build LibTorrent to .lib on Mingw,if you known build libtorrent to .lib on mingw,can you help me ?,thank

    my .pro
    #-------------------------------------------------
    #
    # Project created by QtCreator 2010-04-02T03:14:15
    #
    #-------------------------------------------------

    QT -= gui

    TARGET = MakeTorrent
    CONFIG += console
    CONFIG -= app_bundle
    TEMPLATE = app
    SOURCES += main.cpp
    INCLUDEPATH += C:/Users/BotNetVN/Desktop/boost_1_42_0 C:/Users/BotNetVN/Desktop/SVN/3rdPartyLibs/libtorrent/include C:/Users/BotNetVN/Desktop/boost_1_42_0 C:/Users/BotNetVN/Desktop/SVN/3rdPartyLibs/libtorrent/zlib
    LIBS+= "F:/libboost_filesystem-mgw44-mt-1_42.lib"
    LIBS+= "F:/boost_filesystem-mgw44-1_42.lib"
    LIBS+= "F:/boost_filesystem-mgw44-mt-1_42.lib"
    LIBS+= "F:/libboost_system-mgw44-1_42.lib"

Similar Threads

  1. undefined reference
    By jayreddy in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2009, 13:45
  2. Undefined reference to crt
    By derektaprell in forum Installation and Deployment
    Replies: 0
    Last Post: 20th October 2009, 08:34
  3. Getting Undefined Reference Error
    By A.H.M. Mahfuzur Rahman in forum Qt Programming
    Replies: 2
    Last Post: 22nd June 2009, 02:12
  4. Undefined Reference To...
    By ManuMies in forum Qt Programming
    Replies: 6
    Last Post: 10th February 2009, 12:14
  5. Undefined reference
    By Salazaar in forum Newbie
    Replies: 12
    Last Post: 23rd May 2007, 10:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.