🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.oodesign
Article #56

Weird problem with linker

#56
From: Francisco M. Marzoa
Date: Fri, 06 May 2005 09:13
52 lines
2126 bytes
Hi,

I've a weir problem with BCC linker. This is the error it gives me:

[Linker Error] Unresolved external 'TTagList::GetCount()' referenced 
from C:\DEVEL\SFCOMS\SAMPLEAPPS\RIDEL\RIDELDEMO\READALL.OBJ

Well, ReadAll.cpp is a form of an application that contains this:

...

         if ( Tags->Count ) {

...

Now, Tags is an instance of TTagList, defined on TagList.cpp. In the 
includes of ReadAll.cpp I've put:

...

#include "TagList.h"

...

But this does not make the matter, as It compiles fine, but it does not 
link later.

TTagList has a property that's *public* declared as:


public:

...
         __property int Count = {
                 read=GetCount
         };

Method GetCount for TTagList is declared as:


protected:
         int GetCount (void);


Note that the method is protected, but it should be cause I'm using the 
property Count to access this value and it is public.

As I've said, both modules compiles well by separate, the trouble comes 
when linking. By other side, I've used that TTagList object from a 
component that I'm writting without this problems.

Any ideas?
Technical Details
Message-ID: <427b351e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!newsread.com!newsprint.newsread.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10db1e,44e310bfdda1fa37,start
X-Google-Attributes: gid10db1e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 06 May 2005 11:13:03 +0200
From: "Francisco M. Marzoa" <fmmarzoa@softronica.org>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.oodesign
Subject: Weird problem with linker
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 213.4.20.55
Message-ID: <427b351e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1115370782 213.4.20.55 (6 May 2005 02:13:02 -0700)
Lines: 54
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!newsread.com!newsprint.newsread.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail