不好意思,我再把情况说清楚点。
我的程序本来有一个UISTYLER了,现在我还想加一个MFC的对话框,出现的错误如下:
Linking...
mfcs42d.lib(dllmodul.obj) : error LNK2005: __pRawDllMain already defined in lingjianshuxingxiugai.obj
mfcs42d.lib(dllmodul.obj) : warning LNK4006: __pRawDllMain already defined in lingjianshuxingxiugai.obj; second definition ignored
Creating library Debug/lingjianshuxingxiugai.lib and object Debug/lingjianshuxingxiugai.exp
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/lingjianshuxingxiugai.dll : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
我的部分代码如下:
//#ifdef DISPLAY_FROM_USER_EXIT
extern void ufusr (char *param, int *retcode, int rlen)
{
int response = 0;
int error_code = 0;
CWnd * pParent = AfxGetMainWnd();
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CInitDataBase* pModallessDialog = new CInitDataBase();
pModallessDialog->Create(pParent);
pModallessDialog->ShowWindow(1);
InitDatabase(); //初始化数据库,这是一个函数
if ( ( UF_initialize() ) != 0 )
{
return;
}
if ( ( error_code = UF_STYLER_create_dialog ( "lingjianshuxingxiugai.dlg",
LINGJIAN_cbs, /* Callbacks from dialog */
LINGJIAN_CB_COUNT, /* number of callbacks*/
NULL, /* This is your client data */
&response ) ) != 0 )
{
char fail_message[133];
/* Get the user function fail message based on the fail code.*/
UF_get_fail_message(error_code, fail_message);
UF_UI_set_status (fail_message);
printf ( "%s\n", fail_message );
}
UF_terminate();
return;
}
我看过你以前的代码,我不知道是不是一定要用extern "C" DllExport void ufsta( char *param, int *returnCode, int rlen )这个函数来调用。
请斑竹指点,谢谢!!! |