读书人

编译链接异常

发布时间: 2012-04-12 15:46:35 作者: rapoo

编译链接错误
我是新手,写了一个project,包含若干文件,每个都已经单独编译成功,包括含main()函数的文件MAIN.cpp,最后链接build MAIN.cpp出现了很多错误:

LINK : warning LNK4224: /PDBTYPE is no longer supported; ignored
DigOut.obj : error LNK2005: "public: __thiscall Mathematics::MakOrder::MakOrder(void) " (??0MakOrder@Mathematics@@QAE@XZ) already defined in ContVol.obj
DigOut.obj : error LNK2005: "public: __thiscall Mathematics::MakOrder::MakOrder(unsigned int,unsigned int) " (??0MakOrder@Mathematics@@QAE@II@Z) already defined in ContVol.obj
DigOut.obj : error LNK2005: "public: class Mathematics::TMatrix <unsigned int> const & __thiscall Mathematics::MakOrder::GntOrder(void)const " (?GntOrder@MakOrder@Mathematics@@QBEABV?$TMatrix@I@2@XZ) already defined in ContVol.obj

以前没有写过project,请大家指点一下
顺便说一下,我的每个.h文件都有

#pragma once

#ifndef *_H
#define *_H
//...
#endif


[解决办法]
有没有include啊
[解决办法]
看看代码吧,至少是Main的代码
[解决办法]
那用#ifdef给它宏定义啊

读书人网 >C++

热点推荐