Discussion:
Unresolved External
(too old to reply)
Michael Corby
2008-06-24 22:28:12 UTC
Permalink
Hi

The code below from a DLL compiles ok with BDS 2006.
Now it is giving error message with RAD Studio 2007.

extern "C"
{
// Insert/Modify Edit Routine
bool __declspec(dllexport) InsertModifyEdit(TADOQuery *qName, TForm
*fName, TBitBtn *bName)
{
String fldName, etd;
int etl;
bool allBlank;
bool emptyText;

if (qName->State == dsInsert || qName->State == dsEdit)
{
bName->ModalResult = mrOk; // Will close form

// Loop for all Components
int cCount = fName->ComponentCount;
for (int n=0; n<cCount; n++)
{
emptyText = false;

// TDBComboBox
if (fName->Components[n]->ClassNameIs("TDBComboBox"))
{
// Ignore test if tag set to > 0 ie 1
if (static_cast<TDBComboBox*>(fName->Components[n])->Tag == 0)
{
if (static_cast<TDBComboBox*>(fName->Components[n])->Text.IsEmpty())
{
static_cast<TDBComboBox*>(fName->Components[n])->Color = clYellow;
static_cast<TDBComboBox*>(fName->Components[n])->SetFocus();
fldName = static_cast<TDBComboBox*>(fName->Components[n])->DataField;
emptyText = true;
break;
}
}
}

// TDBLookupComboBox
if (fName->Components[n]->ClassNameIs("TDBLookupComboBox"))
{
// Ignore test if tag set to > 0 ie 1
if (static_cast<TDBLookupComboBox*>(fName->Components[n])->Tag == 0)
{
if
(static_cast<TDBLookupComboBox*>(fName->Components[n])->Text.IsEmpty())
{
static_cast<TDBLookupComboBox*>(fName->Components[n])->Color =
clYellow;
static_cast<TDBLookupComboBox*>(fName->Components[n])->SetFocus();
fldName =
static_cast<TDBLookupComboBox*>(fName->Components[n])->DataField;
emptyText = true;
break;
}
}
}

if (emptyText)
{
SubFunctMessageSound("Error");
MessageDlg("Entry required in " + fldName + " field",
mtError, TMsgDlgButtons() << mbOK,0);
bName->ModalResult = mrNone; // Form will remain open
return false;
}
}
return true;
}
}
//-----------------------------------------------------------------------------

Error message as follows :-

[ILINK32 Error] Error: Unresolved external '__fastcall
Dbctrls::TDBComboBox::GetDataField()' referenced from
C:\USERS\PUBLIC\DOCUMENTS\RAD
STUDIO\PROJECTS\DLLFILES\DEBUG_BUILD\DLLDBASE.OBJ

The TDBLookupComboBox is not giving an error.

Any help appreciated.

Michael Corby
Thomas Maeder [TeamB]
2008-06-25 14:11:14 UTC
Permalink
Post by Michael Corby
Any help appreciated.
IMHO, you could significantly improve the willingness of your audience
to help you by
- not abusing this newsgroup for tests
- not repeatedly posting the same post (I have just canceled the
duplicate)
- helping your audience by posting the minimal code that illustrates
your problem (i.e. just enough, not more and not less)

And please direct your browser at http://www.teamb.com/newsgroups and
read the newsgroup descriptions and guidelines.
Michael Corby
2008-06-25 17:18:58 UTC
Permalink
I apologise for the abuse of the newsgroup.
I have just got a new Vista PC and Windows Mail is giving problems in my
first post.
My post was not showing up in the newsgroup, even though the Sent Folder was
indicating that it was sent, but all posts from others were showing up.
A Microsoft support person has been using my PC remotely for a number of
hours
to try to resolve the problem and it was this person who sent the posts.

Point taken about minimal code.

Again, apologies.

Michael Corby
Post by Thomas Maeder [TeamB]
Post by Michael Corby
Any help appreciated.
IMHO, you could significantly improve the willingness of your audience
to help you by
- not abusing this newsgroup for tests
- not repeatedly posting the same post (I have just canceled the
duplicate)
- helping your audience by posting the minimal code that illustrates
your problem (i.e. just enough, not more and not less)
And please direct your browser at http://www.teamb.com/newsgroups and
read the newsgroup descriptions and guidelines.
Loading...