![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
Experiencing a linking error with MS Visual C++ 2005 Express EditionHi guys, I'm a highly experienced Java programmer who is just making the transition to C++. I look forward to becoming an active poster and contributing the GIDForums community.
I am in the process of experimenting with splitting a project into multiple files. I have a small project consisting of the following five files: Cat.h: CPP / C++ / C Code:
stdafx.h: CPP / C++ / C Code:
Cat.cpp: CPP / C++ / C Code:
CatTest.cpp: CPP / C++ / C Code:
stdafx.cpp: CPP / C++ / C Code:
Unfortunately when I try to compile the above project I receive the following linking error: Code:
Does anyone have any suggestions as to how I might be able to fix this problem? Sincerely, Simon Pearson |
|
#2
|
|||
|
|||
Re: Experiencing a linking error with MS Visual C++ 2005 Express EditionApologies for asking such a newb question.
|
|
#3
|
||||
|
||||
Re: Experiencing a linking error with MS Visual C++ 2005 Express EditionIn CatTest...
change this: CPP / C++ / C Code:
CPP / C++ / C Code:
Note the function calls in the linker errors: Quote:
EDIT: Also, consider adding this small change to all header files from now on, as it will prevent 'redefinition' problems down the road: (this isn't happening now, just looking ahead) Quote:
CPP / C++ / C Code:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#4
|
|||
|
|||
Re: Experiencing a linking error with MS Visual C++ 2005 Express EditionTurboPT, many thanks for offering such a detailed response, I made the changes that you suggested and it all compiles fine now. Thanks for the help.
|
Recent GIDBlog
First week of IA training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Major newbie problem | cynack | MS Visual C++ / MFC Forum | 1 | 08-Apr-2007 11:25 |
| can i run visual 2005 mfc project in visual 6 or 2003? | spillover | MS Visual C++ / MFC Forum | 1 | 27-Dec-2006 18:09 |
| How Visual C++ only from Visual Studio .net | Picstudent | .NET Forum | 2 | 28-May-2006 20:52 |
| What is "Ambigious symbol" ??*( a compilation error) | small_ticket | CPP / C++ Forum | 2 | 07-Jan-2005 21:10 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The