QT Example - Compilinig Errors



  • When I'm trying to run the following example code

    http://qt-project.org/doc/qt-4.8/network-download.html

    I get the follow compiling errors:
    @E:\Qt\Qt5.0.2\Tools\QtCreator\bin\build-network-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\main.o:-1: In function `ZN15DownloadManagerC2Ev':

    E:\Qt\Qt5.0.2\Tools\QtCreator\bin\network\main.cpp:77: multiple definition of `DownloadManager::DownloadManager()'

    E:\Qt\Qt5.0.2\Tools\QtCreator\bin\build-network-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\main.o:-1: In function `ZN15DownloadManagerC2Ev':

    E:\Qt\Qt5.0.2\Tools\QtCreator\bin\network\main.cpp:77: multiple@

    I dont think that it is a big issue but I dont get it. Im using QT 5 and I pasted the pro file and the main.cpp into an empty project.

    Kind regards,
    snprr


  • Moderators

    welcome to devnet

    Did you change anything in the .pro file?
    It looks like you are linking at least twice main.obj that is what the error says.



  • Thank you very much! Seems like i messed up when pasting the .pro file! I did include main twice.
    [quote author="koahnig" date="1371478435"]welcome to devnet

    Did you change anything in the .pro file?
    It looks like you are linking at least twice main.obj that is what the error says. [/quote]


Log in to reply
 

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