vs2008, opencv2.1,compile error in cxcore.hpp

Posted by Long Gu on Stack Overflow See other posts from Stack Overflow or by Long Gu
Published on 2011-01-12T09:50:51Z Indexed on 2011/01/12 9:53 UTC
Read the original article Hit count: 221

Hi, gurus:

I installed opencv2.1, made a new project (proj_A) using vs2008, used it for my computer vision tasks, it works fine.

I copied an old project (proj_B, also made using vs2008) from other PC, compile it with ".h" and ".lib" files copied from opencv1.0 (which I did not install onto my PC), it compiles fine.

I re-directed ".h" and ".lib" files in proj_B to opencv2.1 folders instead, compiled the proj_B, and then I got these errors from cxcore.hpp:


class CV_EXPORTS RNG { public:

enum { A=4164903690U, UNIFORM=0, NORMAL=1 }; // errors here, line 936

errors are:

5>c:\opencv2.1\include\opencv\cxcore.hpp(936) : error C2143: syntax error : missing '}' before 'constant' 5>c:\opencv2.1\include\opencv\cxcore.hpp(936) : error C2059: syntax error : 'constant' 5>c:\opencv2.1\include\opencv\cxcore.hpp(936) : error C2143: syntax error : missing ';' before '}' 5>c:\opencv2.1\include\opencv\cxcore.hpp(936) : error C2238: unexpected token(s) preceding ';'


(400+ similar errors, but I believe the answer should be the same, so only list 1 set here)

I compared setting for proj_A and proj_B, made them identical, and find no improvement. proj_A works well, proj_B refuse to compile.

May I know what's wrong? Urgent, need to get it solved ASAP! Thanks a lot!

© Stack Overflow or respective owner

Related posts about visual-studio-2008

Related posts about opencv