title: How to find the multiple definitions of a function
body: <p>I wrote a findDialog which finds the text searched. When I give <code>make</code> command,it returns</p>
  
  <pre><code>g++ -Wl,-O1 -o findDialog FindDialog.o main.o moc_FindDialog.o    -L/usr/lib -lQtGui -lQtCore -lpthread 
  moc_FindDialog.o: In function `FindDialog::findClicked()':
  moc_FindDialog.cpp:(.text+0x20): multiple definition of `FindDialog::findClicked()'
  FindDialog.o:FindDialog.cpp:(.text+0x30): first defined here
  moc_FindDialog.o: In function `FindDialog::enableFindButton(QString const&amp;)':
  moc_FindDialog.cpp:(.text+0x50): multiple definition of `FindDialog::enableFindButton(QString const&amp;)'
  FindDialog.o:FindDialog.cpp:(.text+0x0): first defined here
  collect2: ld returned 1 exit status
  make: *** [findDialog] Error 1
  </code></pre>
  
  <p>I have searched the problem for hours, but I can not understand what the problem stems from. 
   What can cause <code>multiple definition of</code> error?</p>