VS2005 链接静态库 出现already defined 问题
本来几个工程用的是动态链接库的形式进行链接,但因为产品发布需要,临时fix一个bug,但又不想影响其他工程,所以把需要改动的工程用静态链接的方式重新做了。
在vs2005下边,编译生成lib文件都没问题,但就是连接时不断提示'已定义'的链接错误。
------------------------------------------------
13>netlist.lib(net_helper.obj) : error LNK2005: "public: bool __thiscall netlist::Port::isClock(void)const " (?isClock@Port@netlist@@QBE_NXZ) 已经在 netlist.lib(netlist.dll) 中定义
13>utils.lib(utl_agateexception.obj) : error LNK2005: "public: __thiscall AString::~AString(void)" (??1AString@@QAE@XZ) 已经在 utils.lib(utils.dll) 中定义
13>utils.lib(utl_agateexception.obj) : error LNK2005: "public: void __thiscall ObjectWrapper::addRef(void)" (?addRef@ObjectWrapper@@QAEXXZ) 已经在 utils.lib(utils.dll) 中定义
13>utils.lib(utl_agateexception.obj) : error LNK2005: "public: void * __thiscall ObjectWrapper::getTarget(void)" (?getTarget@ObjectWrapper@@QAEPAXXZ) 已经在 utils.lib(utils.dll) 中定义
13>utils.lib(utl_agateexception.obj) : error LNK2005: "public: __thiscall call_stack::call_stack(struct call_stack const &)" (??0call_stack@@QAE@ABU0@@Z) 已经在 utils.lib(utils.dll) 中定义
13>utils.lib(utl_agateexception.obj) : error LNK2005: "public: __thiscall AgateException::AgateException(class AgateException const &)" (??0AgateException@@QAE@ABV0@@Z) 已经在 utils.lib(utils.dll) 中定义
13>utils.lib(utl_agateexception.obj) : error LNK2005: "public: __thiscall AgateException::AgateException(class AString const &,unsigned int)" (??0AgateException@@QAE@ABVAString@@I@Z) 已经在 utils.lib
------------------------------------------------------------
这个问题怎么解决啊?
本人没太接触过这些东西,真糊涂的啊!