vs2013报错LNK2005和LNK1169: 找到一个或多个多重定义的符号

今天有遇到一个链接的问题,搞得头大了,网上各种方式都试过了还有问题,

>meeting_container.obj : error LNK2005: "struct cms_entity::cms_recinfo cms_entity::CMSRECINFO" (?CMSRECINFO@cms_entity@@3Ucms_recinfo@1@A) 已经在 ConferenceManagerService.obj 中定义
1>meeting_impl.obj : error LNK2005: "struct cms_entity::cms_recinfo cms_entity::CMSRECINFO" (?CMSRECINFO@cms_entity@@3Ucms_recinfo@1@A) 已经在 ConferenceManagerService.obj 中定义
1>LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>F:\work\code\code\CMS+DMS-code\CMS\bin\Debug\ConferenceManagerService\ConferenceManagerService.exe : fatal error LNK1169: 找到一个或多个多重定义的符号

于是我就看到LNK1169,然后继续回归代码,搜了一下CMSRECINFO,后来发现是定义结构体的时候定义的,应该是重复了。就因为这个原因,一直。。。。。。继续加油。。

猜你喜欢

转载自blog.csdn.net/lv0918_qian/article/details/81539956