Mail Archives: djgpp/1997/02/25/02:21:14
On 24 Feb 1997, Bryan Murphy wrote:
> link them together, I get a ton of "Undefined Reference"
> errors. These are all related to my procedures, and not
> the ones in teh C++ libraries (those I instaled). What
> am I not getting right? If I #include "prog.cc" all the
> .cc files into the main program, it compiles properly and
> the program runs, but it won't link if they are compiled
> as separate modules.
>
> gcc test.cc inilib.cc llist.cc -lgpp -liostream
The above command seems to be OK (although you generally should also put
-lstdcxx at the end of the command line). What you describe seems like
some source-level problem, since the program links when it's on a single
source file. So I'd suggest to post the shortest program you can devise
that exhibits the same problem.
- Raw text -