编译出错,高分求救
--------------------Configuration: TVClient - Win32 Debug--------------------
Linking...
mfcs42d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in TVClient.obj
mfcs42d.lib(dllmodul.obj) : error LNK2005: __pRawDllMain already defined in TVClient.obj
mfcs42d.lib(dllmodul.obj) : warning LNK4006: _DllMain@12 already defined in TVClient.obj; second definition ignored
mfcs42d.lib(dllmodul.obj) : warning LNK4006: __pRawDllMain already defined in TVClient.obj; second definition ignored
Creating library \Debug\TVClient.lib and object \Debug\TVClient.exp
\Debug\TVClient.dll : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
这个动态库是MFC的扩展动态库,以前都能编通,过了几个月就不行了,不知道是咋回事?
问题点数:100、回复次数:8Top
1 楼SFirefox(火狐狸)回复于 2002-06-04 09:44:43 得分 20
检查是不是多次包含了某个头文件,直接或间接的。Top
2 楼Lightest(一闪而过)回复于 2002-06-04 09:47:57 得分 20
你看一下 Project->Settings->General的
Microsoft Foundation Classes 是否被设置成Not Using MFCTop
3 楼oracle3(kk)回复于 2002-06-04 09:50:13 得分 20
你可能调用了一个同当前程序不同mfc连编模式的lib库,请检查是否都为动态连编或静态连编Top
4 楼softman_2000(超越昨天)回复于 2002-06-04 10:04:55 得分 20
你是不是自己又写了一个DllMain()函数呀。
程序又一个默认的DllMain()函数,你不用自己写的。Top
5 楼EMeiMonkey(峨眉猴子)回复于 2002-06-04 10:55:40 得分 0
好像以上情况都不是啊!按照原来的设置重新生成库后能够编通,但我加上我自己的一些代码后就不行了,我没有更改编译的设置。自己的代码中包含了头文件direct.h、math.h、io.h。在stdafx.h中包含了
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxole.h> // MFC OLE classes
#include <afxodlgs.h> // MFC OLE dialog classes
#include <afxdisp.h> // MFC Automation classes
#endif // _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORTTop
6 楼EMeiMonkey(峨眉猴子)回复于 2002-06-04 10:58:55 得分 0
WIN32,NDEBUG,_WINDOWS,_WINDLL,_AFXDLL,_MBCS,_AFXEXT,这些是预定义的编译。Top
7 楼Wind_Arrow_Hot(风之箭)回复于 2002-06-04 11:25:09 得分 20
查看你的TVClient.cpp 可能有重复包含!Top
8 楼EMeiMonkey(峨眉猴子)回复于 2002-06-04 11:31:29 得分 0
TVClient.cpp文件自打应用程序框架生成后我压根都没有修改过。我把工程重新生成了一遍,原来是MFC的扩展动态库,现在改为MFC的常规动态库,编译通过了。好像跟这个有关系啊。Top




