L
lucklark
Unregistered / Unconfirmed
GUEST, unregistred user!
我用C++Builder遍了一个带VCL的DLL, 现在VC++中通过project2.dll的标准C函数接口DengluDialog()调用其表单功能.
但是link时报错
MYgina.def : error LNK2001: unresolved external symbol DengluDialog
部分代码如下(在MYgina.def 中已添加了DengluDialog)
BOOL CMYginaApp::InitInstance()
{if (DengluDll == NULL)
{
DengluDll = ::LoadLibrary("project2.dll");
}
if(DengluDll ==NULL)
{
MessageBox(NULL,"LoadLibrary error",NULL,MB_OK);
}
// 导入各个接口函数
if (DengluDll != NULL)
{
Mydenglu = GetProcAddress(DengluDll,"DengluDialog");
}
return CWinApp::InitInstance();
}
int CMYginaApp::ExitInstance()
{
if (DengluDll != NULL)
{
::FreeLibrary(DengluDll);
DengluDll = NULL;
}
return CWinApp::ExitInstance();
}
但是link时报错
MYgina.def : error LNK2001: unresolved external symbol DengluDialog
部分代码如下(在MYgina.def 中已添加了DengluDialog)
BOOL CMYginaApp::InitInstance()
{if (DengluDll == NULL)
{
DengluDll = ::LoadLibrary("project2.dll");
}
if(DengluDll ==NULL)
{
MessageBox(NULL,"LoadLibrary error",NULL,MB_OK);
}
// 导入各个接口函数
if (DengluDll != NULL)
{
Mydenglu = GetProcAddress(DengluDll,"DengluDialog");
}
return CWinApp::InitInstance();
}
int CMYginaApp::ExitInstance()
{
if (DengluDll != NULL)
{
::FreeLibrary(DengluDll);
DengluDll = NULL;
}
return CWinApp::ExitInstance();
}