Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7810295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:43:13+00:00 2026-06-02T03:43:13+00:00

I am using a source code for stereo vision and it gives an error

  • 0

I am using a source code for stereo vision and it gives an error

1>  StereoMain.cpp
1>c:\opencv2.2\include\opencv2\highgui\highgui_c.h(171): error C2059: syntax error : 'constant'
1>c:\opencv2.2\include\opencv2\highgui\highgui_c.h(171): error C3805: 'constant': unexpected token, expected either '}' or a ','
1>  StereoGrabber.cpp
1>c:\opencv2.2\include\opencv2\flann\logger.h(66): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>          e:\program files\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen'
1>c:\opencv2.2\include\opencv2\highgui\highgui_c.h(171): error C2059: syntax error : 'constant'
1>c:\opencv2.2\include\opencv2\highgui\highgui_c.h(171): error C3805: 'constant': unexpected token, expected either '}' or a ','
1>  StereoFunctions.cpp
1>c:\opencv2.2\include\opencv2\flann\logger.h(66): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>          e:\program files\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen'
1>c:\opencv2.2\include\opencv2\highgui\highgui_c.h(171): error C2059: syntax error : 'constant'
1>c:\opencv2.2\include\opencv2\highgui\highgui_c.h(171): error C3805: 'constant': unexpected token, expected either '}' or a ','
1>c:\documents and settings\giga\desktop\vision\source 

Source code

CVAPI(int) cvCreateTrackbar2( const char* trackbar_name, const char* window_name,
                              int* value, int count, CvTrackbarCallback2 on_change,
                              void* userdata CV_DEFAULT(0));

/* retrieve or set trackbar position */
CVAPI(int) cvGetTrackbarPos( const char* trackbar_name, const char* window_name );
CVAPI(void) cvSetTrackbarPos( const char* trackbar_name, const char* window_name, int pos );

enum
{
    CV_EVENT_MOUSEMOVE      =0,
    CV_EVENT_LBUTTONDOWN    =1,
    CV_EVENT_RBUTTONDOWN    =2,
    CV_EVENT_MBUTTONDOWN    =3,
    CV_EVENT_LBUTTONUP      =4,
    CV_EVENT_RBUTTONUP      =5,
    CV_EVENT_MBUTTONUP      =6,
    CV_EVENT_LBUTTONDBLCLK  =7,
    CV_EVENT_RBUTTONDBLCLK  =8,
    CV_EVENT_MBUTTONDBLCLK  =9
};

enum
{
    CV_EVENT_FLAG_LBUTTON   =1,
    CV_EVENT_FLAG_RBUTTON   =2,
    CV_EVENT_FLAG_MBUTTON   =4,
    CV_EVENT_FLAG_CTRLKEY   =8,
    CV_EVENT_FLAG_SHIFTKEY  =16,
    CV_EVENT_FLAG_ALTKEY    =32
};

typedef void (CV_CDECL *CvMouseCallback )(int event, int x, int y, int flags, void* param);

/* assign callback for mouse events */
CVAPI(void) cvSetMouseCallback( const char* window_name, CvMouseCallback on_mouse,
                                void* param CV_DEFAULT(NULL));

Thank you
http://pastebin.com/dpbCxLgK

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T03:43:16+00:00Added an answer on June 2, 2026 at 3:43 am

    I’m guessing that one of your enums has been previously defined somewhere. For example, the following code snippet duplicates that error message in VC++ 2010:

     #define CV_GUI_NORMAL 0x00000010
    
     enum
     {
        CV_GUI_EXPANDED   = 0x00000000,
        CV_GUI_NORMAL     = 0x00000010
     };
    

    The solution is obviously to only define CV_GUI_NORMAL once.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Eclipse provides an opportunity to view java source code by using Source attachement in
Basically I am using some open source code called OrderedDictionary that is derived from
Visual Studio 2008 I am using the following source code that compiles ok using
Is there a way to access the page HTML source code using javascript? I
I am having some trouble trying to checkout the BitSharp source code using SVN.
Using a version control system for your source code (like subversion ) makes sense
jquery.js source code is not being recognised by browser using my page.html served by
Previously when I browsed source code files using Xcode's file browser (located on left
I have commented my java source code with javadoc using tags like {@see myPackage.MyClass}.
I am using svn to download the source code to an open source project.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.