• Advertisement
Sign in to follow this  

Errors Including vfw.h

This topic is 3084 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I included <vfw.h> header after including <windows.h>, and I also included the vfw32.lib library file. Any ideas why I'm getting the following compile errors?
1>c:\program files\microsoft sdks\windows\v6.0\include\vfw.h(3551) : error C2059: syntax error : 'constant'
1>c:\program files\microsoft sdks\windows\v6.0\include\vfw.h(3551) : error C2238: unexpected token(s) preceding ';'

Both errors occurs on the line shown below:
typedef struct tagCapStatus {
    UINT        uiImageWidth;               // Width of the image
    UINT        uiImageHeight;              // Height of the image
    BOOL        fLiveWindow;                // Now Previewing video?
    BOOL        fOverlayWindow;             // Now Overlaying video?
    BOOL        fScale;                     // Scale image to client?
    POINT       ptScroll;  // <-----Here    // Scroll position

Share this post


Link to post
Share on other sites
Advertisement
Try the minimum possible code that will compile and see if you still get the error:

#include <windows.h>
#include <vfw.h>

int main ()
{
return 0;
}

The above code compiles for me without error. If it compiles for you as well, I'd say there's something else in your code that's causing problems - in particular, what have you got #define'd?

Share this post


Link to post
Share on other sites
Take this as a lesson to avoid #define where possible in C++. Which is approximately always.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement