how to compile c++ programs using textpad?

sdaccord01

Senior member
Jul 9, 2003
291
0
0
Hi, I just downloaded textpad and visual c++ 2003 toolkit, how do I compile a C++ program once I'm finished writing the code?
 

kalster

Diamond Member
Jul 23, 2002
7,355
6
81
to compile form console

just run the environment variables batch file(think its called vcvars.bat or something) in a console window and use the nmake utility that ships with VS2003

if you dont have a make file, write a simple .mak file for your source file

there might be a way to directly compile the .cpp or .c file, but i dont know how, i always work with make files
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
there might be a way to directly compile the .cpp or .c file, but i dont know how, i always work with make files

Make files generally just hold the commands used to compile the files, how would you not know those commands if you made the make files?
 

singh

Golden Member
Jul 5, 2001
1,449
0
0
Originally posted by: Nothinman
there might be a way to directly compile the .cpp or .c file, but i dont know how, i always work with make files

Make files generally just hold the commands used to compile the files, how would you not know those commands if you made the make files?

AFAIK, Visual Studio can auto-generate the makefiles for you.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Probably true, but why waste time messing with nmake at all then? Why not just hit the compile button?
 

singh

Golden Member
Jul 5, 2001
1,449
0
0
Originally posted by: Nothinman
Probably true, but why waste time messing with nmake at all then? Why not just hit the compile button?

Command line compilation is very helpful when you have to generate executables from a remote location. Some companies also do automated builds where the source is checked out and the project automatically built. This would be very difficult without command-line compilation available.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I realize that, but I can't imagine using a build system like that and not having some idea what the make files actually do.