开发者

OpenCV - Errors

Trying to compile an example from the "Learning OpenCV" book, I got the following errors (How can I fix them?):

> 1>playVideo.obj : error LNK2005: _main
> already defined in imageload.obj
> 1>C:\Users\avbder\Documents\Visual
> Studio
> 2008\Projects\opencv\Debug\opencv.exe
> : fatal err开发者_如何转开发or LNK1169: one or more
> multiply defined symbols found 1>Build
> log was saved at
> "file://c:\Users\avbder\Documents\Visual
> Studio
> 2008\Projects\opencv\opencv\Debug\BuildLog.htm"
> 1>opencv - 2 error(s), 0 warning(s)
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
> ==========

Thanks.


You have two main() definitions. One in playVedio.cpp and the other in imageload.cpp. Try deleting one of them. Or you can post your codes here and let's see what can be done to fix it.


So both playVideo.obj and imageload.obj defines the main function. You need to investigate which one you need. Perhaps there is some define to set or you have included some file too much.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜