473,395 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to Compile Program?

Hello everyone!
I had already installed VC6.0 in my computer, then i installed the Vs.net.
I wrote some programs of vs.net with the UtraEdit and compiled them in
command line. For example, i wrote a program of Hello World with C#
language:

using System;
class MainApp
{
public static void Main()
{
Console.WriteLine("Hello World using C#!");
}
}

and wrote a batch file: build.bat
csc /debug+ /out:.\HelloCS.exe HelloCS.cs

then i executed the batch command, but resulting informed "csc isn't a inner
command!"( system doesn't find the compile command of the csc. I find
windows don't add the path of vs.net to the default path of windows in the
installing( My system is win2k). The paths of vs6.0 had been added to the
default path of windows, these path include: \vc98\bin;\common\Ms Dev98\bin;
\common\Tools; \common\Tools\WinNT etc.

How can i reset the system path in order that the compile command, for
example: csc.exe command, can be find in the compiling.

thank you!
jzp

2003.10.28


Jul 21 '05 #1
1 1863
Try adding the following line to your build.bat file, before the call to csc:

call "%VSCOMNTOOLS%\vsvars32.bat"

Calling this batch file will put the VS tools on your path. The VSCOMNTOOLS environment variable is added to your
default environment by the VS .NET 2002 installer, and points to Program Files\Microsoft Visual Studio .NET\Common7
\Tools on a default installation. If you're using VS .NET 2003, use VS71COMNTOOLS instead.

Thanks,
Grayson

This posting is provided "as is" with no warranties and confers no rights.
--------------------
| >From: "ping" <jz****@sina.com.cn>
| >Subject: How to Compile Program?
| >Date: Tue, 28 Oct 2003 09:41:57 +0800
| >Lines: 40
| >X-Priority: 3
| >X-MSMail-Priority: Normal
| >X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
| >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
| >Message-ID: <#D**************@TK2MSFTNGP12.phx.gbl>
| >Newsgroups: microsoft.public.dotnet.general
| >NNTP-Posting-Host: 61.149.30.80
| >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| >Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:113402
| >X-Tomcat-NG: microsoft.public.dotnet.general
| >
| >Hello everyone!
| >I had already installed VC6.0 in my computer, then i installed the Vs.net.
| >I wrote some programs of vs.net with the UtraEdit and compiled them in
| >command line. For example, i wrote a program of Hello World with C#
| >language:
| >
| > using System;
| > class MainApp
| > {
| > public static void Main()
| > {
| > Console.WriteLine("Hello World using C#!");
| > }
| > }
| >
| >and wrote a batch file: build.bat
| > csc /debug+ /out:.\HelloCS.exe HelloCS.cs
| >
| >then i executed the batch command, but resulting informed "csc isn't a inner
| >command!"( system doesn't find the compile command of the csc. I find
| >windows don't add the path of vs.net to the default path of windows in the
| >installing( My system is win2k). The paths of vs6.0 had been added to the
| >default path of windows, these path include: \vc98\bin;\common\Ms Dev98\bin;
| >\common\Tools; \common\Tools\WinNT etc.
| >
| >How can i reset the system path in order that the compile command, for
| >example: csc.exe command, can be find in the compiling.
| >
| > thank you!
| >
| >
| >jzp
| >
| >2003.10.28
| >
| >
| >
| >
| >
| >
| >
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Brian | last post by:
Greetings: I am trying to compile the following code via command line. It compiles just fine in visual studio 2002 v7 so i took looked at the properties and i got the following command line...
17
by: newbiecpp | last post by:
I have hard time to understand run-time environment. Let assume that I have a program that has a simple variable alpha. When this variable is statically allocated, the compiler can use the...
5
by: Brice Prunier | last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace )...
10
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat...
10
by: Bart Goeman | last post by:
Hi, I have a question about how to put redundant information in data structures, initialized at compile time. This is often necessary for performance reasons and can't be done at run time (data...
3
by: | last post by:
I am trying to compile a simple c# class in Web Matrix called howdy.cs: // Program start class public class HowdyPartner { // Main begins program execution public static void Main() { //...
4
by: John Smith | last post by:
Hi I'm porting some C++ code to new platforms and have some 1-byte aligned structures which need a specific size. Since datatypes can vary on different platforms (which I found out the hard way...
1
by: 张沈鹏 | last post by:
How to compile the HelloWorld of boost.asio? Maybe this is a stupid problem , but I really don't konw how to find the right way. My compile environment is WinXP, Msys , MinGw , G++ 3.4.2,...
109
by: zaidalin79 | last post by:
I have a java class that goes for another week or so, and I am going to fail if I can't figure out this simple program. I can't get anything to compile to at least get a few points... Here are the...
2
by: BruceWho | last post by:
I downloaded boost1.35.0 and built it with following command: bjam --toolset=msvc-7.1 --variant=release --threading=multi -- link=shared --with-system stage and it failed to compile, error...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.