Share via


Create an External Project

You can create a project to run external commands, such as batch files or other executables that you have created outside of the development environment. You can use the resulting project, which runs inside the development environment, to build your program(s).

To add an external project to an existing project workspace

  1. On the File menu, click New.

  2. In the New dialog box, click the Projects tab.

  3. In the Project Name text box, type a name for the project.

  4. From the list of project types, select Makefile.

  5. Choose to either:

    • Create new workspace   A separate workspace is created for this external project.

    • Add to current workspace   The resulting project is added to the current workspace or to one that you can specify if you check the Dependency of check sbox.

  6. Select any of the available platforms for which you want to create initial Debug and Release configurations.

  7. Click OK.

    Visual C++ prompts you to open the Project Settings dialog box and explicitly specify the tool that the development environment must run to build the project.

  8. From the following list, select the options that apply or fill in the appropriate information in the text boxes.

    • Build Command Line   The command line that the operating system executes for this project when you click Build on the Build menu. By default, the system executes Microsoft NMAKE with the /F option followed by the name of the external makefile. You can, however, add any batch or executable filename along with command-line options and input files.

    • Rebuild all options   The options added to the command line when you click Rebuild All on the Build menu. By default, the /A option for Microsoft NMAKE is added.

    • Output file name   The name of the file that is created when you build the project. This could be an application or static library, for instance.

    • Browse info file name   Name of the browse information file to create for this project. It must have the extension .BSC.

  9. Click the Debug tab.

  10. Select the General category from the Category list, and type in the text boxes the information required for debugging. The development environment uses this information when you choose commands such as Go or Step Into on the Debug menu.

    • Executable for debug session   The name of the program that the external project builds if you are debugging an executable program, or the name of the executable file that calls a DLL if you are debugging a DLL. If you are debugging an executable file on a remote machine, this executable file on the local machine contains the symbolic debugging information.

    • Working directory   The working directory that the application uses when it runs. This directory may be different from the output files directory in the project. It could contain test cases, for instance.

    • Program arguments (for .EXE files)   Arguments that need to be passed to the executable file when it starts.

    • Remote executable path and file name   The name for the executable file that you are debugging on a remote machine. The location for this executable file is specified relative to the remote machine.

  11. Select the Additional DLLs category from the Category list on the Debug tab, and specify the information required for debugging. The development environment uses this information when you choose commands such as Go or Step Into on the Debug menu.

    • Modules   Use this grid control to specify additional DLLs (or EXEs, or OCXs, and so on) to debug. If you check the box to the left of the active line in the grid, the associated debugging symbols will be preloaded. Preloading symbols allows you to set breakpoints before the specified module loads. Use the Browse button, to the right of the active line in the grid, to simplify specifying files, including remote files, that are outside the scope of your system variables.

    • Try to locate other DLLs   If this check box is selected, the debugger asks for additional DLLs when debugging begins.