MSVC++ 2005, Project Dependancies and unresolved externals [modified]
-
Hi, I'm having some trouble using classes defined in one project (compiled as exe) in another project (also to be compiled as exe, to run in a separate process, but part of the same solution). Is it possible at all? Or do I have to import all the .cpp files into the other project and compile them there? I've set up a project dependency, but that doesn't work. I get unresolved externals during compilation. Note, I've also set up project references.
modified on Thursday, July 17, 2008 12:45 PM
-
Hi, I'm having some trouble using classes defined in one project (compiled as exe) in another project (also to be compiled as exe, to run in a separate process, but part of the same solution). Is it possible at all? Or do I have to import all the .cpp files into the other project and compile them there? I've set up a project dependency, but that doesn't work. I get unresolved externals during compilation. Note, I've also set up project references.
modified on Thursday, July 17, 2008 12:45 PM
All the code an individual project needs to build must be part of the project, or available to the project through a library. How you manage the physical files is up to you. I personally use a "common" folder in the solution's folder to keep my common/shared cpp/.h files in one location - only one codebase to update. All projects can reference files there using relative paths, something like "..\common\somecommoncode.h". Mark
Mark Salsbery Microsoft MVP - Visual C++ :java: