为何从www.microsoft.com/msj下载的TraceWin一加入到项目就出错(编译错误),有谁知道其用法?

vcmfc 2000-07-28 01:40:00
我从网上下载了TraceWin,按其说明在在CMyApp.h中包含了#include "tracewin.h",且在CMyApp的初始程序中调用CTraceFile::Init(),结果在编是产生N个错误?,谁知道正确的用法?
...全文
218 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
vcmfc 2001-10-14
  • 打赏
  • 举报
回复
谢谢老兄,这个问题我很早就解决了,谢谢!
redoak2000 2001-10-09
  • 打赏
  • 举报
回复
我是使用MSDN中的连接DOWN下来的,最后更新日期:97-1-1
不对吧。我用的很好啊。
TraceWin.h中有使用说明呢。
DEBUG版:
如果用MFC DLL版,连头文件也不用#include,程序代码什么也不用改就可以。
如果是静态的则要加入#include ,并加入MfxTraceInit&MfxTraceTerm。
RELEASE版:
没用。

vcmfc 2000-11-15
  • 打赏
  • 举报
回复
谢谢大家关心,给分。
vcmfc 2000-09-24
  • 打赏
  • 举报
回复
只能在CMyApp.cpp中#include "tracewin.h",
vcmfc 2000-09-22
  • 打赏
  • 举报
回复
自已找到解决方法了,只能在CmyApp.cpp中包含头文件即可.
vcmfc 2000-08-27
  • 打赏
  • 举报
回复
难道没人会吗?
vcmfc 2000-08-27
  • 打赏
  • 举报
回复
如此也,我下载了下一个Lodprf32.exe,Thank You jjou.
vcmfc 2000-08-25
  • 打赏
  • 举报
回复
这是加入CFileTrace在InitInstance中加入CFileTrace::Init();后产生的错误:
MainFrm.obj : error LNK2005: "protected: static struct CRuntimeClass * __stdcall CFileTrace::_GetBaseClass(void)" (?_GetBaseClass@CFileTrace@@KGPAUCRuntimeClass@@XZ) already defined in testww.obj
MainFrm.obj : error LNK2005: "public: virtual struct CRuntimeClass * __thiscall CFileTrace::GetRuntimeClass(void)const " (?GetRuntimeClass@CFileTrace@@UBEPAUCRuntimeClass@@XZ) already defined in testww.obj
MainFrm.obj : error LNK2005: "public: virtual void __thiscall CFileTrace::Write(void const *,unsigned int)" (?Write@CFileTrace@@UAEXPBXI@Z) already defined in testww.obj
MainFrm.obj : error LNK2005: "public: static int __cdecl CFileTrace::Init(void)" (?Init@CFileTrace@@SAHXZ) already defined in testww.obj
MainFrm.obj : error LNK2005: "public: static struct CRuntimeClass const CFileTrace::classCFileTrace" (?classCFileTrace@CFileTrace@@2UCRuntimeClass@@B) already defined in testww.obj
MainFrm.obj : error LNK2005: "public: static int CFileTrace::autoInit" (?autoInit@CFileTrace@@2HA) already defined in testww.obj
ChildFrm.obj : error LNK2005: "protected: static struct CRuntimeClass * __stdcall CFileTrace::_GetBaseClass(void)" (?_GetBaseClass@CFileTrace@@KGPAUCRuntimeClass@@XZ) already defined in testww.obj
ChildFrm.obj : error LNK2005: "public: virtual struct CRuntimeClass * __thiscall CFileTrace::GetRuntimeClass(void)const " (?GetRuntimeClass@CFileTrace@@UBEPAUCRuntimeClass@@XZ) already defined in testww.obj
ChildFrm.obj : error LNK2005: "public: virtual void __thiscall CFileTrace::Write(void const *,unsigned int)" (?Write@CFileTrace@@UAEXPBXI@Z) already defined in testww.obj
ChildFrm.obj : error LNK2005: "public: static int __cdecl CFileTrace::Init(void)" (?Init@CFileTrace@@SAHXZ) already defined in testww.obj
ChildFrm.obj : error LNK2005: "public: static struct CRuntimeClass const CFileTrace::classCFileTrace" (?classCFileTrace@CFileTrace@@2UCRuntimeClass@@B) already defined in testww.obj
ChildFrm.obj : error LNK2005: "public: static int CFileTrace::autoInit" (?autoInit@CFileTrace@@2HA) already defined in testww.obj
testwwDoc.obj : error LNK2005: "protected: static struct CRuntimeClass * __stdcall CFileTrace::_GetBaseClass(void)" (?_GetBaseClass@CFileTrace@@KGPAUCRuntimeClass@@XZ) already defined in testww.obj
testwwDoc.obj : error LNK2005: "public: virtual struct CRuntimeClass * __thiscall CFileTrace::GetRuntimeClass(void)const " (?GetRuntimeClass@CFileTrace@@UBEPAUCRuntimeClass@@XZ) already defined in testww.obj
testwwDoc.obj : error LNK2005: "public: virtual void __thiscall CFileTrace::Write(void const *,unsigned int)" (?Write@CFileTrace@@UAEXPBXI@Z) already defined in testww.obj
testwwDoc.obj : error LNK2005: "public: static int __cdecl CFileTrace::Init(void)" (?Init@CFileTrace@@SAHXZ) already defined in testww.obj
testwwDoc.obj : error LNK2005: "public: static struct CRuntimeClass const CFileTrace::classCFileTrace" (?classCFileTrace@CFileTrace@@2UCRuntimeClass@@B) already defined in testww.obj
testwwDoc.obj : error LNK2005: "public: static int CFileTrace::autoInit" (?autoInit@CFileTrace@@2HA) already defined in testww.obj
testwwView.obj : error LNK2005: "protected: static struct CRuntimeClass * __stdcall CFileTrace::_GetBaseClass(void)" (?_GetBaseClass@CFileTrace@@KGPAUCRuntimeClass@@XZ) already defined in testww.obj
testwwView.obj : error LNK2005: "public: virtual struct CRuntimeClass * __thiscall CFileTrace::GetRuntimeClass(void)const " (?GetRuntimeClass@CFileTrace@@UBEPAUCRuntimeClass@@XZ) already defined in testww.obj
testwwView.obj : error LNK2005: "public: virtual void __thiscall CFileTrace::Write(void const *,unsigned int)" (?Write@CFileTrace@@UAEXPBXI@Z) already defined in testww.obj
testwwView.obj : error LNK2005: "public: static int __cdecl CFileTrace::Init(void)" (?Init@CFileTrace@@SAHXZ) already defined in testww.obj
testwwView.obj : error LNK2005: "public: static struct CRuntimeClass const CFileTrace::classCFileTrace" (?classCFileTrace@CFileTrace@@2UCRuntimeClass@@B) already defined in testww.obj
testwwView.obj : error LNK2005: "public: static int CFileTrace::autoInit" (?autoInit@CFileTrace@@2HA) already defined in testww.obj

vcmfc 2000-08-15
  • 打赏
  • 举报
回复
没人使用过TrayWin吗?
vcmfc 2000-08-06
  • 打赏
  • 举报
回复
程序错误是没有, 但是VC报告在程序中使用的公共类的RunTimeClass重定义, 无法产生.exe,大虾能否给一个例子吗?
My E-Mail:vcmfc@sina.com
U皮特U 2000-08-05
  • 打赏
  • 举报
回复
什么错误?说来听听!
vcmfc 2000-08-04
  • 打赏
  • 举报
回复
Are you Know user?

16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧