How To Insert Existing Projects as Sub-Projects (145936)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
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.
Modification Type: | Minor | Last Reviewed: | 7/1/2004 |
---|
Keywords: | kbhowto kbide KB145936 |
---|
|