Unresolved external Pgaccess::TPgConnection::SetPortW
Posted: Wed 11 Feb 2009 05:14
Hello
This is small code example
And RAD 2009 Cbuilder coud not link with error
[ILINK32 Error] Error: Unresolved external '__fastcall Pgaccess::TPgConnection::SetPortW(int)' referenced from C:\CBPRJ\PGCONNECT\DEBUG\UNIT1.OBJ
When I comment
Everething OK
Any suggestion?????
This is small code example
Code: Select all
Unit1.h
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include
#include
#include
#include
#include
#include "DBAccess.hpp"
#include "PgAccess.hpp"
#include
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TEdit *edUsername;
TEdit *edPassword;
TEdit *edPort;
TUpDown *udPort;
TComboBox *cbDatabase;
TButton *bOk;
TButton *bCancel;
TLabel *lblUsername;
TLabel *lblPassword;
TLabel *lblServer;
TLabel *lblDatabase;
TLabel *lblPort;
TPgConnection *PgConnection1;
TEdit *edServer;
void __fastcall bOkClick(TObject *Sender);
void __fastcall cbDatabaseEnter(TObject *Sender);
void __fastcall bCancelClick(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------
Unit1.cpp
//---------------------------------------------------------------------------
#include
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "DBAccess"
#pragma link "PgAccess"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::bOkClick(TObject *Sender)
{
PgConnection1->Username = edUsername->Text;
PgConnection1->Password = edPassword->Text;
PgConnection1->Server = edServer->Text;
PgConnection1->Port = udPort->Position;
PgConnection1->Database = cbDatabase->Text;
PgConnection1->Connected = true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::cbDatabaseEnter(TObject *Sender)
{
if (!cbDatabase->Items->Count)
{
PgConnection1->Username = edUsername->Text;
PgConnection1->Password = edPassword->Text;
PgConnection1->Server = edServer->Text;
PgConnection1->Port = udPort->Position;
PgConnection1->Database = "template1";
PgConnection1->GetDatabaseNames(cbDatabase->Items);
PgConnection1->Connected = true;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::bCancelClick(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
[ILINK32 Error] Error: Unresolved external '__fastcall Pgaccess::TPgConnection::SetPortW(int)' referenced from C:\CBPRJ\PGCONNECT\DEBUG\UNIT1.OBJ
When I comment
Code: Select all
//PgConnection1->Port = udPort->Position;
Any suggestion?????