Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

ERROR LNK 2005 & fatal error LNK1169



  • ERROR LNK :2005already defined in qhttpnetworkconnectionchannel.obj

    fatal error LNK1169: one or more multiply defined symbols found.

    I install vs 2013 .bt this error is displayed how to solve this


  • Lifetime Qt Champion

    @Rameshguru As the error message states you have multiple definition of a symbol. That means that this symbol is defined in more than one place. Please show the whole error message, because it is not clear which symbol it is.



  • Most probably you have a function / method defined in a header and it is not inline.



  • @jsulm

    moc_qnetworksession_p.cpp
    moc_qbearerplugin_p.cpp
    moc_qdnslookup_p.cpp
    Generating Code...
    Compiling...
    moc_qhostinfo_p.cpp
    moc_qabstractsocketengine_p.cpp
    moc_qhttpsocketengine_p.cpp
    moc_qsocks5socketengine_p.cpp
    moc_qtcpsocket.cpp
    moc_qudpsocket.cpp
    moc_qnativesocketengine_p.cpp
    Generating Code...
    link /NOLOGO /DYNAMICBASE /NXCOMPAT /BASE:0x64000000 /DEBUG /DLL /SUBSYSTEM:WINDOWS /VERSION:5.8 /MANIFEST:embed /OUT:....\lib\Qt5Networkd.dll @C:\Users\Pondy\AppData\Local\Temp\nm8BF0.tmp
    qhttp2protocolhandler.obj : error LNK2005: "private: static int const QHttp2ProtocolHandler::sessionMaxRecvWindowSize" (?sessionMaxRecvWindowSize@QHttp2ProtocolHandler@@0HB) already defined in qhttpnetworkconnectionchannel.obj
    qhttp2protocolhandler.obj : error LNK2005: "private: static int const QHttp2ProtocolHandler::streamInitialRecvWindowSize" (?streamInitialRecvWindowSize@QHttp2ProtocolHandler@@0HB) already defined in qhttpnetworkconnectionchannel.obj
    qhttp2protocolhandler.obj : error LNK2005: "private: static unsigned int const QHttp2ProtocolHandler::maxAcceptableTableSize" (?maxAcceptableTableSize@QHttp2ProtocolHandler@@0IB) already defined in qhttpnetworkconnectionchannel.obj
    Creating library ....\lib\Qt5Networkd.lib and object ....\lib\Qt5Networkd.exp
    ....\lib\Qt5Networkd.dll : fatal error LNK1169: one or more multiply defined symbols found
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\link.EXE"' : return code '0x491'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'

    tis is the error



  • As I told in my previous post, look how and where you did define QHttp2ProtocolHandler::sessionMaxRecvWindowSize and QHttp2ProtocolHandler::sessionMaxRecvWindowSize: I doubt they are defined in QHttpNetworkConnectionChannel.cpp.
    My bad, I didn't realise you're actually compiling Qt. I guess you've messed up with the configuration.


  • Lifetime Qt Champion

    @Rameshguru Are you building Qt?



  • @JohanSolo sir i install qt during compilation how to find and change this



  • @jsulm yes sir


  • Lifetime Qt Champion

    Hi,

    What exact version of Qt 5.8 are you building ?
    Do you really need to do that with VS2013 ?
    What parameters did you pass to configure ?



  • configure -release -confirm-license -nomake examples -nomake tests -skip qtwebkit-examples -opensource -icu -I C:\icu\include -L C:\icu\lib64 -opengl dynamic

    i have pass this comment


Log in to reply