急!有谁见过这样的errors?

littlebin 2005-04-05 08:18:47
我在我的工程中应用了一些api函数和外来的lib库文件,可是运行程序后,出现下列的错误,如:
Linking...
nafxcwd.lib(afxmem.obj) : error LNK2005: "public: static void __stdcall CObject::operator delete(void *)" (??3CObject@@SGXPAX@Z) already defined in aam-api.lib(AAMAnalyzeSynthesizeOpenGL.obj)
感觉好象我使用的库文件中某个定义与MFC自带的库文件nafxcwd.lib中的定义相冲突,不知各位编程高手有没有遇到过这样的问题,请不吝赐教,我将感激不尽.
谢谢!
...全文
123 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
用动态编译试一下,静态编译的时候,同一个函数可能会出现在不同的obj文件中。
动态编译的话,只有一份。
xuzheng318 2005-04-08
  • 打赏
  • 举报
回复
symbol already defined in object

The given symbol, displayed in its decorated form, was multiply defined.

Tips

One of the following may be a cause:

The most common cause of this error is accidentally linking with both the single-threaded and multithreaded libraries. Ensure that the application project file includes only the appropriate libraries and that any third-party libraries have appropriately created single-threaded or multithreaded versions.


The given symbol was a packaged function (created by compiling with /Gy) and was included in more than one file but was changed between compilations. Recompile all files that include the symbol.


The given symbol was defined differently in two member objects in different libraries, and both member objects were used.


An absolute was defined twice, with a different value in each definition
billy145533 2005-04-08
  • 打赏
  • 举报
回复
using name space

2,586

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 资源
社区管理员
  • 资源
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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