Compiling a simple C program with Microsoft Visual Studio .NET 2003

A

Arnaud Miege

Hi,

I am going through a C tutorial and would like to compile a simple C program
using Microsoft Visual Studio .NET 2003. I can open my *.c file but I can't
figure out a way to compile it.

If I try in the command window something like:

"cl -o hello hello.c"

I have the following message:

"Dummy version of CL to satisfy B&T's bogus requirement that it be on the
path"

Can anybody help?

Many thanks in advance,

Arnaud
 
C

Carl R. Davies

Arnaud said:
I am going through a C tutorial and would like to compile a simple C program
using Microsoft Visual Studio .NET 2003. I can open my *.c file but I can't
figure out a way to compile it.

How did you start your project? Did you use the 'Start Page' or go
through File->New->Project root?

Using either of these methods will setup your development environment
correctly then it's only a matter of Build->Build Solution or ctrl +
shift + b
 
A

Arnaud Miege

I don't have a project. I don't even know what a project is. It's just a
single C file. I worked out how to do it with the command line. The command
I was using was correct but I needed to run vcvars32.bat first (MVS had just
been installed) and now it works OK. But I still haven't figured out a way
to do it from the MVS window without having to type the compile command in
the command window.

Thanks,
 
R

Richard Tobin

Arnaud Miege said:
"Dummy version of CL to satisfy B&T's bogus requirement that it be on the
path"

Do you have any idea who B&T are? Bill and Ted perhaps?

-- Richard
 
F

Flash Gordon

Arnaud Miege wrote:

Replies belong below the text you are replying to, not above as you
placed it. See the majority of the posts in this group for examples.
I don't have a project. I don't even know what a project is. It's just a
single C file. I worked out how to do it with the command line. The command
I was using was correct but I needed to run vcvars32.bat first (MVS had just
been installed) and now it works OK. But I still haven't figured out a way
to do it from the MVS window without having to type the compile command in
the command window.

<snip>

This group is for standard C, not the specifics of particular
development systems. If the manuals are not good enough then try a group
dedicated to your implementation, probably somewhere in the microsoft.*
hierarchy, where there will be lots of people who know about Visual Studio.
 
M

Mark McIntyre

If I try in the command window something like:
"cl -o hello hello.c"
I have the following message:
"Dummy version of CL to satisfy B&T's bogus requirement that it be on the path"

Sounds like your installation is broken. Talk to your sysadmin and get
him to reinstall.

Further questions are offtopic here, since its not a C question, its a
problem with your installation.

By the way, MS's c compilers don't work like unix ones, that command
line is wrong. Read the compiler docs about how to create projects,
build s/w etc.
 
M

Malcolm

Arnaud Miege said:
single C file. I worked out how to do it with the command line. The
command I was using was correct but I needed to run vcvars32.bat first
(MVS had just been installed) and now it works OK. But I still haven't
figured out a way to do it from the MVS window without having to type the
compile command in the command window.
You're doing the right thing.
Write a "Hello world" program, and then play with the compiler, read
documentation, demand a service engineer from Microsoft call, and generally
fiddle about until you mage to get it to compile and run.
Then try to work out what you did and you can run arbitrary C code (with any
luck).
 
C

clayne

20$ says cl is actually another exe or wrapper hiding out somewhere
else in his path.

There's no way a Microsoft product would issue that kind of error
message.
 
D

Das

Arnaud said:
Hi,

I am going through a C tutorial and would like to compile a simple C program
using Microsoft Visual Studio .NET 2003. I can open my *.c file but I can't
figure out a way to compile it.

generally the Advanced IDEs Need a Project To be created, And compiled.
If I try in the command window something like:

"cl -o hello hello.c"

I have the following message:

"Dummy version of CL to satisfy B&T's bogus requirement that it be on the
path"

Can anybody help?

I have No Idea Regarding the Message and .Net compilers.

To create a project You Go to File->New->Project. It will create a
project space for You Then You Browse the property of the project. Add
your File To it and save the project( Remember to Check If the files
created by MVS has a main(). Then You have to delete that file. Or at
least modify it.)

Then Use compile/Build from Appropriate Menu.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top