title: New in Qt getting Linker and Makefile errors
body: <p>I want to run and compile some <code>Qt</code> code so I can learn it , I went to the website below and I saw they provided some <code>Qt</code> examples</p>
  <p><a href="http://www.trinitydesktop.org/docs/qt4/widgets-analogclock.html" rel="nofollow noreferrer">Sample Qt Code</a></p>
  <p>I use the latest version, then I copied the code but I get these errors :</p>
  <blockquote>
  <p>mainwindow.obj:-1: error: LNK2005: main already defined in main.obj</p>
  <p>debug\uwm.exe:-1: error: LNK1169: one or more multiply defined symbols
  found</p>
  </blockquote>
  <p><strong>So I asked my question in '<a href="http://qt-project.org/forums/viewthread/27223/" rel="nofollow noreferrer">qt forum</a>' , They suggested to delete &quot;mainwindow.h&quot; and &quot;mainwindow.cpp&quot; from directory of my project</strong></p>
  <p>If I do so, the first errors are gone but after I build the project I get new ones :</p>
  <blockquote>
  <p>11:58:21: Running steps for project uwm... 11:58:21: Configuration
  unchanged, skipping qmake step. 11:58:21: Starting:
  &quot;C:\Qt\Qt5.0.2\Tools\QtCreator\bin\jom.exe&quot;<br />
  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
  &quot;C:\Qt\Qt5.0.2\Tools\QtCreator\bin\jom.exe&quot; 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.</p>
  </blockquote>