Visual Studio modifies the file name and path of an executable program

Source: Internet
Author: User
Tags visual studio 2010


Typically, we use project engineering created by Visual Studio to produce executable file names that match the name of the project, such as test with the project name, and the resulting file name is usually Test.exe. But sometimes we hope project the name of the executable file is not the same as the project name, or you want the resulting executable file to be saved under another path, you can do this by following these steps.


1. Under Visual Studio 2008

Select the menu bar "items"-"Properties"-"linker"-"general", as shown in the following illustration, the output file is set with the default road strength and project name, and you can see that the output executable is named after the project name, so we can modify the default project name with the name we want.


As shown in the following illustration, I replace "$ (ProjectName). exe" with "Math.exe"


After recompiling, you can see the resulting Math.exe executable under the same road strength, as shown in the following illustration:


If you also want to modify the path of the makefile, assuming that we want the generated executable to be in the C disk directory, you can modify the "C:" To replace "$ (OutDir)", as shown in the following figure:


After recompiling, you can see the generated Math.exe file in the C disk directory, as shown in the following illustration:


2. Under Visual Studio 2010

Under VS2010, you can modify output directory and target file name in configuration Properties-General. As shown in the following illustration, we modify the "Output directory" of the work project to "C:\" and modify the "target filename" to "myjob".


After recompiling, you can see the generated "Myjob.exe" file in the C disk directory, as shown in the following figure:


The VS2010 can also be set in the linker-general, as in the case of the VS2008 environment, without being described here.









Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.