From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: C++ Newbie Problem Date: Fri, 09 May 1997 09:42:00 -0700 Organization: Alcyone Systems Lines: 24 Message-ID: <337353D8.3C762FB3@alcyone.com> References: <5ktt99$hj5 AT sun3 DOT uni-essen DOT de> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Frank Borally wrote: > btest.cc(.text+0x10): undefined reference to `Bruch::Bruch(void)' > btest.cc(.text+0x20): undefined reference to `Bruch::Bruch(int, int)' > btest.cc(.text+0x2c): undefined reference to `Bruch::print(void)' > btest.cc(.text+0x49): undefined reference to `Bruch::Bruch(int)' > btest.cc(.text+0x63): undefined reference to `Bruch::print(void)' > btest.cc(.text+0x6f): undefined reference to `Bruch::print(void)' > > Why doesn't that work? Can't I use the book with the djgpp c++ compiler? Because you need to compile both modules. The linker is saying, quite correctly, that "I can't find where you defined these things," because you haven't told it to compile bruch.cc. Instead use gxx btest.cc bruch.cc -o btest.exe -- Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com Alcyone Systems / web / http://www.alcyone.com/max/ San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W \ "The future / is right there." / Bill Moyers