Unresolved external错误。。。
Javpp 2006-09-14 10:36:41 [Linker Error] Unresolved external '__fastcall Forms::TApplication::SetHandle(unsigned int)' referenced from D:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\RELEASE\VCLE.LIB|_t_Forms
[Linker Error] Unresolved external '__fastcall Dialogs::ShowMessage(const System::AnsiString)' referenced from F:\CPP\GMVRCS2006\OBJ\GMV2006.OBJ
[Linker Error] Unresolved external 'Forms::Application' referenced from F:\CPP\GMVRCS2006\OBJ\GMV2006.OBJ
[Linker Error] Unresolved external '__fastcall Forms::TApplication::ShowException(Sysutils::Exception *)' referenced from F:\CPP\GMVRCS2006\OBJ\GMV2006.OBJ
代码如下:
//---------------------------------------------------------------------------
#include <vcl.h>
#include <Dialogs.hpp>
#include "winbase.h"
#pragma hdrstop
HANDLE (__stdcall *LoadMainForm) (TApplication *App);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
//Load dll
HINSTANCE HInst = LoadLibrary ("Frame.dll");
if (HInst)
{
LoadMainForm = (HANDLE (__stdcall *) (TApplication *App)) GetProcAddress (HInst, "LoadMainForm");
if (LoadMainForm)
{
Application->Handle = LoadMainForm (Application);
}
else
{
ShowMessage ("File Error!");
return 1;
}
}
else
{
ShowMessage ("Load dll Error!");
return 1;
}
FreeLibrary ("Frame.dll");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
return 0;
}
//---------------------------------------------------------------------------
把OPTION中的COMPLIER中选中REALSE, 就出现这个错误, 调试状态下就没问题。。。奇怪了