How To Insert Existing Projects as Sub-Projects
Article ID: 145936
Article Last Modified on 7/1/2004
APPLIES TO
- Microsoft Visual C++ 4.0 Standard Edition
- Microsoft Visual C++ 5.0 Enterprise Edition
- Microsoft Visual C++ 5.0 Professional Edition
- Microsoft Visual C++ 6.0 Enterprise Edition
- Microsoft Visual C++ 6.0 Professional Edition
- Microsoft Visual C++ 6.0 Standard Edition
This article was previously published under Q145936
SUMMARY
There is no way to insert an existing project as a project or subproject of
the current workspace in Visual C++, version 4.0. The Insert menu has a
Projects command that you can use to create new projects and sub-projects
for the workspace, but you can't use it to insert projects into the
workspace.
However, you can create a new sub-project of type makefile and insert a
link from it to an existing project's makefile. This provides one of the
major benefits of a sub-project; when the main project is building,
it will do a 'make' of the linked project.
If you have a project that creates a library, and in another workspace you
have a project to create an .exe file that uses the library, you can create
a makefile sub-project in the .exe project that contains commands to build
a library project. When building the main (.exe) project, if a dependent
file of the linked (library) project is out of date, the file and the
library will be re-built, and the changes will be incorporated into the
main project.
Because the project is not truly inserted into the workspace, the project
workspace window will not be able to display class, file, or resource
information about the linked project.
This limitation has been removed in Visual C++, versions 5.0 and 6.0. Click
the workspace name in the File View. On the Project menu, click Insert
Project into Workspace.
Keywords: kbhowto kbide KB145936