![]() |
|
#1
|
|||
|
|||
Multiple definition of `motor::adicionarthread()'I got three files in my test project:
CPP / C++ / C Code:
CPP / C++ / C Code:
CPP / C++ / C Code:
I get this error after trying to compile it: Code:
but if I remove void motor::adicionarthread(){cout<<"hi";}; of motor.cpp and add this same line to main.cpp, the compilation works. Last edited by admin : 29-Mar-2008 at 04:35.
Reason: Fixed typos
|
|
#2
|
||||
|
||||
Re: Multiple definition of `motor::adicionarthread()'In main.cpp, you included motor.cpp. You should have included motor.h (and not motor.cpp).
__________________
www.blake-foster.com |
|
#3
|
|||
|
|||
Re: Multiple definition of `motor::adicionarthread()'I thought you have multiple declaration in your header file and need to overload parameters.
|
|
#4
|
|||
|
|||
Re: Multiple definition of `motor::adicionarthread()'main.cpp should be looking similar to this
CPP / C++ / C Code:
__________________
Logic is Inevitable. |
Recent GIDBlog
Toyota - 2008 September Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strange problem! | shagy1010 | Computer Hardware Forum | 2 | 16-Jan-2008 07:35 |
| need help with linker problem | calin86 | C++ Forum | 5 | 27-Mar-2007 19:10 |
| Strange C++ code memory leakage problem | gaoanyu | C++ Forum | 7 | 04-Nov-2005 08:09 |
| linker problem | svenveer | C Programming Language | 6 | 17-Oct-2005 13:38 |
| Strange problem when I try to print a value? | 7eleven | C Programming Language | 2 | 15-May-2004 10:45 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The