[TriLUG] newbie question about g++
ed at eh3.com
Sat Dec 14 23:39:01 EST 2002
On Sat, 2002-12-14 at 20:51, ray bordt wrote:
> i have three files: dive.h, dive.cpp, and divemain.cpp
> i tried g++ -o divemain.o divemain.cpp and receive errors.
> dive.h is included in divemain.cpp and dive.cpp.
> how can i compile dive.cpp and divemain.cpp at the same time?
g++ -c -o dive.o dive.cpp
g++ -c -o divemain.o divemain.cpp
g++ -o diveprog divemain.o dive.o
and, assuming you don't need to link against anything else, that should
Edward H. Hill III, PhD
Post-Doctoral Researcher | Email: ed at eh3.com, ehill at mines.edu
Division of ESE | URLs: http://www.eh3.com
Colorado School of Mines | http://cesep.mines.edu/people/hill.htm
Golden, CO 80401 | Phones: 303-384-2094, 303-273-3483
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the TriLUG