link error in qt



  • hi all,

    while am using libtins library in qt am getting the following linker errors
    tins.lib(ip_address.obj):-1: error: LNK2019: unresolved external symbol __imp__inet_pton@12 referenced in function "private: unsigned int __thiscall Tins::IPv4Address::ip_to_int(char const *)" (?ip_to_int@IPv4Address@Tins@@AAEIPBD@Z)

    tins.lib(ipv6_address.obj):-1: error: LNK2001: unresolved external symbol __imp__inet_pton@12

    tins.lib(utils.obj):-1: error: LNK2019: unresolved external symbol __imp__getaddrinfo@16 referenced in function __catch$?route6_entries@Utils@Tins@@YA?AV?$vector@URoute6Entry@Utils@Tins@@V?$allocator@URoute6Entry@Utils@Tins@@@std@@@std@@XZ$0

    tins.lib(utils.obj):-1: error: LNK2019: unresolved external symbol __imp__freeaddrinfo@4 referenced in function "class Tins::IPv4Address __cdecl Tins::Utils::resolve_domain(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?resolve_domain@Utils@Tins@@YA?AVIPv4Address@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)

    tins.lib(network_interface.obj):-1: error: LNK2001: unresolved external symbol _GetAdaptersAddresses@20

    tins.lib(utils.obj):-1: error: LNK2019: unresolved external symbol _SendARP@16 referenced in function "class Tins::HWAddress<6,unsigned char> __cdecl Tins::Utils::resolve_hwaddr(class Tins::NetworkInterface const &,class Tins::IPv4Address,class Tins::PacketSender &)" (?resolve_hwaddr@Utils@Tins@@YA?AV?$HWAddress@$05E@2@ABVNetworkInterface@2@VIPv4Address@2@AAVPacketSender@2@@Z)

    etc....

    my .pro file looks like this

    #-------------------------------------------------

    Project created by QtCreator 2015-04-11T15:30:28

    #-------------------------------------------------

    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = idk
    TEMPLATE = app
    DEFINES += "TINS_STATIC"

    SOURCES += main.cpp
    mainwindow.cpp

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui

    INCLUDEPATH +=C:\Users\nisha.v\Desktop\libtins-vs2013-Win32-debug\include

    LIBS +=-ltins
    -lwpcap

    if this can be of any use to u in helping me out............

    thanks in advance.....



  • hi

    i resolved this issue by adding the following library to the project directory and to the .pro file........

    IPHlpApi.lib
    WS2_32.lib

    thank u


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.