Only OBJ or other files, but no CPP, can compile the EXE file ZZ

Source: Internet
Author: User
Programming tools: VC ++ 6.0
Operating System: Win95 osr2
An experiment was conducted to create an SDI program with VC, and then delete the. exe file in the DEBUG directory and the. cpp file in the project directory. All other files are retained. In this case, you only need to use VC to call the project normally and compile it to generate the EXE file. (But VC will give you some warning and ignore it) but I think this may not be the case, which is too simple. You may not have any files except OBJ and resource files. If this is the case, it may be complicated. The following operations are for your reference only.
(1) create a directory named after the project, and then create two subdirectories: Release and Res. (Because you do not have a CPP file, it is impossible to build the debugging version of the program.) then copy the OBJ file to the release subdirectory. If you have a resource file, copy it again. copy the RC file to the project directory and copy the resource file to the res subdirectory. This is the first step, and then
(2) enter the DOS window, right-click the title bar of the DOS window, select "attribute", "Memory"-"initial environment, and ensure that the environment variable space value is greater than 1024. If the value is not greater than, increase it (the DOS window must be restarted after adjustment ). Go to the bin directory of VC and find a vcvars32.bat file. (There are two bin directories, and I forgot which bin the file is in vc5. It sets the compiling and connection environment.
(3) Use the RC. EXE file to compile the RC file. Generate the res file and import it into the release subdirectory.
(4) create a BAT file with the following content:
Link/nologo/subsystem: Windows/Incremental: yes/machine: i386
/Out: "Release \ testsec.exe" Release \ mainfrm. OBJ release \ stdafx. OBJ
Release \ testsec. OBJ release \ testsecdoc. OBJ release \ testsecview. OBJ
Release \ testsec. Res
Note: testsec... it is the name of the file I tested. You should replace it with your file name. If there are many OBJ files, you can add them to the end of this line in sequence (note that each file is separated by a space. All content must be a line ).
(5) execute the BAT file just created. If there is no problem, you should see the EXE file in the release subdirectory.

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.