help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compiler 2 programs worte in c++


From: Ulrich Eckhardt
Subject: Re: compiler 2 programs worte in c++
Date: Sun, 09 May 2004 09:08:13 +0200
User-agent: KNode/0.7.6

Joseph KHOURY wrote:
> Can you tell me the instruction to compile 2 programs in c++ and 
> one header file under GNU?

Header files aren't compiled, they are just an interface description. As
for the 'programs', I assume that you mean source files
(.cpp, .cc, .cxx, .C). 

# compile sourcefiles (creates *.o)
g++ -Wall -c source1.cpp
g++ -Wall -c source2.cpp
# link
g++ -Wall source1.o source2.o -o progname

hth

Uli

-- 
Questions ?
see  C++-FAQ Lite: http://parashift.com/c++-faq-lite/  first !



reply via email to

[Prev in Thread] Current Thread [Next in Thread]