locked
error using opencv with VC++ 2005

    Question

  • hi ,

    i was developing an application using OpenCv and Visual studio 2005.
    the application works fine ... but when i include "highgui.h" ... i start getting
    following errors :

    error C2872: 'CvvImage' : ambiguous symbol
    could be 'C:\Program Files\OpenCV\otherlibs\highgui\highgui.h(427) :
    CvvImage'
    or 'C:\Program Files\Microsoft Visual Studio
    8\VC\atlmfc\include\atlimage.h(68) : ATL::CvvImage'



    .... it seems it is due to the fact that i am using VC++ library class "CImage"
    .... when i change the seqeuence of inclusion of header file the error changes
    to :

    error C2440: '=' : cannot convert from 'CvvImage *' to 'ATL::CImage *'


    can any one tell the solution .... ?


    thanx :

    Samarth
    Monday, February 08, 2010 4:42 AM

Answers

  • Hello,

    It seems the complier has found 'CvvImage' in two files based on the error message, you may comment the include express which includes your own file to see if it helps.

    As I am not the expert on C++, you may post this issue on the Visual C++ General Forum or OpenCV User Group so you can get better and quicker response.

    Thanks.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    Tuesday, February 09, 2010 9:22 AM

All replies

  • Hello,

    It seems the complier has found 'CvvImage' in two files based on the error message, you may comment the include express which includes your own file to see if it helps.

    As I am not the expert on C++, you may post this issue on the Visual C++ General Forum or OpenCV User Group so you can get better and quicker response.

    Thanks.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    Tuesday, February 09, 2010 9:22 AM
  • thanx for the reply ... u were right ...

    i solved the problem by commenting the line which "#define CImage" .... in "highgui.h"  ...... as suggested by one more usee through mail .


    :)

    regards :

    Samarth
    Wednesday, February 10, 2010 9:15 AM