This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: newbie question on linking classes
- From: John Love-Jensen <eljay at adobe dot com>
- To: Koyel Mukherjee <koyelmjee at gmail dot com>, GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 27 Mar 2008 11:39:48 -0500
- Subject: Re: newbie question on linking classes
Hi Koyel,
You are compiling and linking source.cpp.
You need to compile and link all your source code.
e.g.
g++ source.cpp uno.cpp dos.cpp tres.cpp -o myapp
If you do your compiling separate from your linking:
g++ source.o uno.o dos.o tres.o -o myapp
HTH,
--Eljay