L
liuchy
Unregistered / Unconfirmed
GUEST, unregistred user!
下面是我的一部分原代码
Dll头文件
#ifndef cDBDMH
#define cDBDMH
#ifdef _BUILD_DLL
#define _EXPORT_TYPE __declspec(dllexport)
#else
#define _EXPORT_TYPE __declspec(dllimport)
#endif
class _EXPORT_TYPE TDBModule;
class TDBModule : public TDataModule{
__published: // IDE-managed Components
TDataSource *s_dsStoredP_9;
private: // User declarations
public: // User declarations
__fastcall TDBModule(TComponent* Owner);
void __fastcall DBModuleCreate(TObject *Sender);
void __fastcall DBModuleDestroy(TObject *Sender);
TDataSource* BrowseTable(unsigned char DBID, WideString TableName, WideString FilterStatement, AnsiString *ErrorS);
TDataSource* GetTable(unsigned char DBID, WideString TableName, WideString FilterStatement, AnsiString *ErrorS);
bool SetServer(AnsiString ServerName,AnsiString *ErrorS);
}
生成DLL后,对象的方法均是可见的(用TDUMP查看).但在主程序调用时,编译通过,连接时提示"Unresolved external TDBModule::BrowseTable referenced from module xxx.obj"的错误,不知道错误出在那里?以上头文件在主程序中已经引用.
Dll头文件
#ifndef cDBDMH
#define cDBDMH
#ifdef _BUILD_DLL
#define _EXPORT_TYPE __declspec(dllexport)
#else
#define _EXPORT_TYPE __declspec(dllimport)
#endif
class _EXPORT_TYPE TDBModule;
class TDBModule : public TDataModule{
__published: // IDE-managed Components
TDataSource *s_dsStoredP_9;
private: // User declarations
public: // User declarations
__fastcall TDBModule(TComponent* Owner);
void __fastcall DBModuleCreate(TObject *Sender);
void __fastcall DBModuleDestroy(TObject *Sender);
TDataSource* BrowseTable(unsigned char DBID, WideString TableName, WideString FilterStatement, AnsiString *ErrorS);
TDataSource* GetTable(unsigned char DBID, WideString TableName, WideString FilterStatement, AnsiString *ErrorS);
bool SetServer(AnsiString ServerName,AnsiString *ErrorS);
}
生成DLL后,对象的方法均是可见的(用TDUMP查看).但在主程序调用时,编译通过,连接时提示"Unresolved external TDBModule::BrowseTable referenced from module xxx.obj"的错误,不知道错误出在那里?以上头文件在主程序中已经引用.