473,398 Members | 2,088 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,398 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 1864
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
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.