Compiling and linking the gcc and g ++ command line

Hi, I have a little problem compiling and linking to the command line (windows xp). Each .c file and the .cpp file that I am compiling, or the link, must be in the same directory as gcc (C: \ Program Files \ gcc \ bin), and it is quite difficult to track my files among all these files, related to gcc, and annoying them too :). My question is: how to compile a file in the desktop folder using the command line?

I usually go:

c: \ program files \ gcc \ bin> gcc -c test.c test2.c

when my source files are in the recycle bin.

Which command do I compile when the file is somewhere else.

+5
source share
3

. . "". " ". "PATH" .

c:\program files\gcc\bin

.

+9

c:\program files\gcc\bin PATH. gcc/g++

+3

, gcc PATH. c: c:\program files\gcc\bin ,

+3

All Articles