Copied some example code but getting an error ~~~ Please help
-
First of all , I am new in qt and coming from Java
I want to run and compile some qt code so I can learn it , then I went to this website and saw they provided some qt examples
"http://www.trinitydesktop.org/docs/qt4/widgets-analogclock.html":http://www.trinitydesktop.org/docs/qt4/widgets-analogclock.html
I use the latest version of the qt and I copied the code but I get some error please help !
http://s11.postimg.org/7w4rsg3v7/Scrshot1.png
http://s11.postimg.org/p854dvxcj/Scrshot2.png
http://s11.postimg.org/9ubfqfwcz/Scrshot3.png
http://s11.postimg.org/vs7wk8bdf/Scrshot4.png
http://s11.postimg.org/e4q3m11g3/Scrshot5.pngor
https://www.dropbox.com/sh/i2kze8hgbyp0s6t/RphTWF19NW
Errors:
@mainwindow.obj:-1: error: LNK2005: main already defined in main.obj
debug\uwm.exe:-1: error: LNK1169: one or more multiply defined symbols found@ -
Thanks Man, I went to the directory of project and deleted mainwindow.cpp and mainwindow.h
and now errors are gone
But after I build it it didn't run the program
Please help !!!http://s22.postimg.org/iqosatggx/Scrshot6.png
http://s22.postimg.org/d3sfdcdy9/Scrshot7.png
http://s22.postimg.org/m2ihqdiu9/Scrshot8.png
http://s22.postimg.org/4iz3m63s1/Scrshot9.pngand I get this error
http://s21.postimg.org/6z7t2mnx3/Scrshot11.png
@11:58:21: Running steps for project uwm...
11:58:21: Configuration unchanged, skipping qmake step.
11:58:21: Starting: "C:\Qt\Qt5.0.2\Tools\QtCreator\bin\jom.exe"
C:\Qt\Qt5.0.2\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
Error: dependent '..\uwm\mainwindow.cpp' does not exist.
jom: D:\qt\build-uwm-Desktop_Qt_5_0_2_MSVC2012_64bit-Debug\Makefile [debug] Error 2
11:58:21: The process "C:\Qt\Qt5.0.2\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project uwm (kit: Desktop Qt 5.0.2 MSVC2012 64bit)
When executing step 'Make'
11:58:21: Elapsed time: 00:00.@ -
go to the project in your case "uwm" with the mouse and press right mouse button. Select "Run qmake" and rebuild afterwards.
[quote author="amir734jj" date="1367080713"]
@
Error: dependent '..\uwm\mainwindow.cpp' does not exist.
@[/quote]This line tells you that the file, which you have eliminated, is missing. Which is certainly, but it is still in your setup. Since the .pro file looks correct, Qt creator has not redone the makefiles, which you do manually with the sequence above.