15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Adding an existing proj as a subproj?

Jeff Wishnie -- jwishnie@swellsoft.com
Tuesday, February 20, 1996

Config: VisC++ 4.0, Win95

Does anyone know how to add an existing Project as a subproject to another
existing project?

According to the docs:

-----------------------------------------------------
To include an existing project as a subproject

1. From the Build menu, choose Subprojects.
The Subprojects dialog box appears.

2. From the Select Project To Modify list, select the project that is to
contain the subproject.
The Select Subprojects To Include list displays the projects that you can
include as subprojects of the selected project. Projects that are already
subprojects for this project have a check next to them.

3. From the Select Subprojects To Include list, select the project (or
projects) that you want to include as a subproject.

4.Choose OK.
 ----------------------------------
Problem is, the Subprojects dialog box doesn't show anything, even when I
place the projects I want to add as subprojects inthe main projects directory.

I've created new projects as subprojects, but I really don't want to have to
create a new one and copy over all the files and settings from my existing
projects.

So, what's the trick?

Thanks,

Jeff
jwishnie@swellsoft.com
415 552-3125(w)




Nick Gall -- nick_gall@usemail.com
Saturday, February 24, 1996

[Mini-digest: 2 responses]

On Tue, 20 Feb 1996 23:55:08 -0800, Jeff Wishnie wrote:

>Config: VisC++ 4.0, Win95
>
>Does anyone know how to add an existing Project as a subproject to another
>existing project?
>
>According to the docs:

Jeff, I tried to do the same thing. I found some other piece of
documentation that said you cannot add an existing project as a
subproject to another existing project. I can't remember what piece of
doc it was, KB or readme or what. I will try to dig it up, but I
thought you might like to know this right away so you can stop
pounding your head against the wall.

-- Nick

-----From: nick_gall@usemail.com (Nick Gall)

On Tue, 20 Feb 1996 23:55:08 -0800, Jeff Wishnie wrote:

>Config: VisC++ 4.0, Win95
>
>Does anyone know how to add an existing Project as a subproject to another
>existing project?
>
>According to the docs:

Here's the doc I was talking about:

>How to Insert Existing Projects as Sub-Projects 
>Article ID: Q145936
>Revision Date: 13-FEB-1996

>The information in this article applies to:

> - The development environment included with:
>   Microsoft Visual C++, 32-bit Edition, version 4.0


>SUMMARY 

>There is currently no way to insert an existing project as a project or subproject of the current workspace. 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. 

>MORE INFORMATION 

>Step-by-Step Procedure 

>From a project workspace, to create a sub-project link to an existing separate project, follow these steps: 

>1. On the Insert menu, click Projects. This will bring up the Insert
>   Project dialog box that can create (but not insert existing) projects.
>   To get here another way, you can on Build menu, click Subprojects, and
>   then click New.

>2. From the Insert Project dialog box, select a Project of type Makefile.
>   Specify a project name and whether or not it is to be a subproject of an
>   existing project.

>3. Click Create, and then click Yes. This takes you directly to the Project
>   Settings dialog box for this new project.

>4. In the Settings For list, select a configuration of the new makefile
>   sub-project that matches one of the configurations of the main project.
>   For example, select the Win32 Debug configuration. This is important
>   because when you build a main project, Developer's Studio will look for
>   the matching sub-project configuration and build that. If there is no
>   matching sub-project configuration, the sub-project will be ignored.

>5. Click the General tab, remove the NMAKE command from the build command
>   line, and instead invoke a batch file to run NMAKE on the existing
>   project makefile. A batch file is required because project makefiles use
>   relative paths, and the current directory must be set to the directory
>   of the project makefile - something you can do in a batch file. For
>   example, the command for the Win32 Debug configuration should look
>   something like this one:

>   c:\MyOldProject\MyOldProject.bat "MyOldProject - Win32 Debug"

>   If the old project was created by Visual C++ 2.0, the string would be
>   "Win32 Debug" - look in the makefile to be sure.

>   If you always want the sub-project built the same way for all
>   configurations, just have the same batch command for each configuration.

>   In this sample, the batch file is in main directory of the old existing
>   project. It works well there because that makes it easy to include the
>   project in the sub-projects of any other new projects you might create.

>6. Note the Rebuild all option. When you use the Rebuild all option on the
>   main project, this option will be passed as a parameter to your batch
>   file. This is best left '/a'.

>7. Change the Output file name to the actual library or .exe file that will
>   be created, and be sure to specify the full path.

>8. Do steps 4-5 for each configuration you will use.

>9. Write the batch file to change the working directory to that of the
>   original project directory, and then invoke NMAKE on the project's .mak
>   file. The batch file can also pass along the arguments for rebuild all
>   and the configuration specifier. For example:

>   cd c:\MyOldProject
>   nmake %2 -f MyOldProject.mak CFG=%1

>   Given the build command listed in step 5, %1 will contain the
>   configuration string and %2 will contain the rebuild all option (which
>   will be blank for normal builds).

>   NOTE: the batch file must not contain any commands for user interaction
>   such as PAUSE. The output of the batch file is sent to the debug window,
>   which is display only. Developer's Studio will hang waiting for input
>   from the user in a window that does not allow input.


>Additional reference words: kbinf 4.00



>KBCategory: kbusage kbtool kbhowto
>KBSubcategory: VWBIss NmakeIss

>THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS
>PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.  MICROSOFT DISCLAIMS
>ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES
>OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
>EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR
>ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL,
>CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF
>MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE
>POSSIBILITY OF SUCH DAMAGES.  SOME STATES DO NOT ALLOW THE EXCLUSION
>OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES
>SO THE FOREGOING LIMITATION MAY NOT APPLY.

>Copyright Microsoft Corporation 1996.






| Вернуться в корень Архива |