C++ Compiler error - sytax error : missing ';' before Hsemaphore

This should be simple enough to solve but I have never come across this error in C++. This problem appears on line 1018 of strmif.h. this header file is used by Dshow.h which is a header file used with DirectX. The full line is

typedef DWORD_PTR Hsemaphore;

This is not the only definition it happens to. anything defined in the same way returns an error.
After the error shown above the compiler also returns an error "unexpected end of file" on the same line. I would appreciate any information on this error.
AnthonyFeeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AlexFMCommented:
DWORD_PTR us unsigned long. You need to install Microsoft SDK to compile this code. If you already have SDK installed, ensure that SDK include directories are searched before VC++ include directories.
If you want to compile this without SDK, add line:

typedef unsigned long DWORD_PTR

before including of Dshow.h.
0
AnthonyFeeAuthor Commented:
hey. thanks for the reply. i have discovered that the problem was to do with the latest summer release of the SDK for directx. Apparently it's not compatible with Microsoft visual studios 6. When i downloaded an earlier version these errors disappeared but I have gotten a few more I hope you can help me with. They are all in the building stage again and seem to be all based around the same problem. below are a few examples.

Example.obj : error LNK2001: unresolved external symbol _MEDIASUBTYPE_Y411

Example.obj : error LNK2001: unresolved external symbol _MEDIASUBTYPE_YVU9

Example.obj : error LNK2001: unresolved external symbol "void __cdecl _CVAssert(char const *,char const *,int,char const *)" (?_CVAssert@@YAXPBD0H0@Z)

Example.obj : error LNK2001: unresolved external symbol _MEDIATYPE_Video

Example.obj : error LNK2001: unresolved external symbol "void __cdecl _CVTrace(char const *,char const *,int)" (?_CVTrace@@YAXPBD0H@Z)

It seems that the linker can't locate all it wants to but i don't know how to go about resolving these errors. I have all files that are used included in the main cpp file. Thanks again for your help!
0
AlexFMCommented:
You need to add some .lib file to the linker list: Project - Properties - Link - Object/library modules. Type here .lib file name.
I don't know what library do you need, you can find this in MSDN Library topics describing DirectX functions used in the project.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.