Use vcbuild to compile the Visual Studio project on the command line

Source: Internet
Author: User
Use vcbuild to compile the Visual Studio project on the command line

I recently upgraded to vs2008 and found that the old ace is no longer usable. Although I do not like Ace very much, I have to re-compile ACE + Tao because of work needs. The company's broken computer compilation Ace is still making it happen, and it is a little powerless to compile Tao with vs2008 (too many projects and too many files), just listen to the CPU fan burst, then, the computer ran around for a long time (I used to compile Tao at home, and then I took the binary file to the company for use ).

So I thought that compiling directly in the command line may be much faster, but I found it and did not see the makefile files available for nmake, I remember that I could export the VC project as makefile, but I couldn't find it now. I checked it online. In Versions later than vs2005, I provided a vcbuild tool, you can directly compile Visual Studio projects and solutions.

The Command Format of vcbuild is as follows:
Vcbuild [Options] [Project | solution] [config | $ all]

There are not many introductions in msdn, but only some options descriptions. The actual example is as follows:
Vcbuild/rebuild dftj_tools_vc8.sln "Release | Win32"

Because "Release | Win32" contains a '|' symbol, it cannot be used directly and must be enclosed in quotation marks.

Here is a bat file I wrote, which can compile ACE + Tao at one time (environment variables and config. h need to be set ).
Cd % ace_root %/ace
Vcbuild/upgrade ace_vc8.vcproj
Vcbuild ace_vc8.vcproj "Debug | Win32"

Cd % ace_root %/apps/gperf/src
Vcbuild/upgrade gperf_vc8.vcproj
Vcbuild gperf_vc8.vcproj "Debug | Win32"

Cd % tao_root %/tao_idl
Vcbuild/upgrade tao_idl_vc8.sln
Vcbuild tao_idl_vc8.sln "Debug | Win32"

Cd % tao_root %/Tao
Vcbuild/upgrade tao_vc8.sln
Vcbuild tao_vc8.sln "Debug | Win32"

Cd % tao_root %/orbsvcs
Vcbuild/upgrade orbsvcs_vc8.sln
Vcbuild orbsvcs_vc8.sln "Debug | Win32"

In addition, a shell script for compiling ACE + Tao under UNIX is attached.
#! /Bin/CSH

# Install ace
CD $ ace_root/ace;
Rm-F config. h;
Ln-s config-sunos5.9.h config. h;

CD $ ace_root/include/makeinclude;
Rm-F platform_macros.gnu;
Ln-s platform_sunos5_g ++. GNU platform_macros.gnu;

CD $ ace_root/ace; gmake;

# Install Tao
CD $ ace_root/apps/gperf/src; gmake;

CD $ tao_root/tao_idl; gmake;
CD $ tao_root/TAO; gmake;
CD $ tao_root/TAO/orbsvcs; gmake;

Compiling through command lines is indeed much more concise. Visual Studio is powerful, and it seems that it is not flexible.

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.