X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "arizvi" Newsgroups: comp.os.msdos.djgpp Subject: Re: Problem with make: undefined reference to vtable Date: 24 Jun 2005 12:21:59 -0700 Organization: http://groups.google.com Lines: 33 Message-ID: <1119640919.881671.6920@f14g2000cwb.googlegroups.com> References: <1119626620 DOT 773374 DOT 221740 AT g49g2000cwa DOT googlegroups DOT com> <1119627784 DOT 991069 DOT 124850 AT g44g2000cwa DOT googlegroups DOT com> <3i2t6hFjk29aU2 AT news DOT dfncis DOT de> NNTP-Posting-Host: 66.32.249.19 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1119640926 25216 127.0.0.1 (24 Jun 2005 19:22:06 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Fri, 24 Jun 2005 19:22:06 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse AT google DOT com Injection-Info: f14g2000cwb.googlegroups.com; posting-host=66.32.249.19; posting-account=Se-Idg0AAAC00LEpjdiQS7ZeyWGDYpCA To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > > Instead of: > > > ./test_view.o:: test_view.cpp infoDialog.cpp > > > I had: > > > ./test_view.o:: infoDialog.cpp test_view.cpp > > Those are both equally wrong. This rule can only make sense if you > #include one .cpp file into the other. Don't do that. Compile each > separately, and leave it to the linker to combine them. > I dont understand how both rules are wrong. Afaik, the top rule states that test_view.o depends on test_view.cpp and infoDialog.cpp. So if infoDialog.cpp changes, test_view.cpp will be recompiled. What you are suggesting (let me know if I am wrong) is that the rules should be simply ./test_view.o:: test_view.cpp ./infoDialog.o:: infoDialog.cpp, and then I lose the dependency I am looking for. Or are you implying that if I include infoDialog.h in test_view.cpp, I will get the dependency automatically? I have certainly no wish to 'include' one cpp file in another. I am only want to link them together. The rule './test_view.o:: test_view.cpp infoDialog.cpp' is only a dependency. Please let me know if I am wrong. -Ahmad