If you do NOT post the CB Build Log, I will add you to my list of people to ignore since you are just wasting everybody's time in this thread!
Tim S.
If you do NOT post the CB Build Log, I will add you to my list of people to ignore since you are just wasting everybody's time in this thread!
Tim S.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
Sorry, I thought the errors were enough. Here it is:
Code:cl.exe /nologo /MD /EHc /EHs /GS /Gy /D_USING_V110_SDK71_ /GS /GL /analyze- /W3 /Gy /Zc:wchar_t /Zi /Gm- /O2 /sdl /fp:precise /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /Gd /Oy- /Oi /MD /EHsc /nologo /I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include" /I"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include" /ID:\openssl-1.0.1c\inc32\ /ID:\openssl-1.0.1c\inc32\openssl /ID:\OpenCV\build\include /ID:\OpenCV\build\include\opencv2 /ID:\@C++\CURL\libcurl-7.19.3-win32-ssl-msvc\include /IC:\WinDDK\7600.16385.1\inc\api /ID:\DIRECTSHOW\FFMPEG\ffmpeg-20140713-git-42c1cc3-win32-dev\include /I"C:\Program Files (x86)\Microsoft SDKs\Cpp REST SDK for Visual Studio 2013\SDK\include" /I"C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses" /I"C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\common" /I"C:\Program Files (x86)\Windows Kits\8.1\Include\shared" /I"C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include" /c D:\test.cpp /FoD:\test.obj test.cpp D:\test.cpp(25) : error C2143: syntax error : missing ';' before '<' D:\test.cpp(25) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Process terminated with status 2 (0 minutes, 1 seconds) 2 errors, 0 warnings
Last edited by Ducky; 12-27-2014 at 04:05 PM.
Using Windows 10 with Code Blocks and MingW.
FYI:
Do you have the Windows SDK Installed that contains the header Streams.h?
I tried the code you posted and I am now trying to install the Windows 8.1 SDK to see if the error goes away.
I got the same error with MSVS 2010; but, I was missing the header Streams.h.
Edit: It is about 800MByte download; so, I will NOT be done with it for several hours.
Tim S.
Last edited by stahta01; 12-27-2014 at 05:33 PM.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
Still waiting for the Windows 8.1 SDK to download.
But, I did get it to compile by breaking the rules using Windows SDK 7.1
You might be right about a Circular dependency problem or it might just be an user issue. I am NOT a C++ programmer and I use MSVC very rarely.Code:#include <windows.h> #include <Dshow.h> // I had to move this header before the headers inside Streams.h // #include <Streams.h> // #include <wxdebug.h> // Debug support for logging and ASSERTs #include <Combase.h> #include <Wxlist.h>
Tim S.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
FYI:
You should NOT be including more that a single windows SDK; but, this is a guess from a C programmer instead of a C++ programmer.
No idea about this SDK include path.
Mixing multiple versions of Windows SDK is normally a very bad idea.Code:/I"C:\Program Files (x86)\Microsoft SDKs\Cpp REST SDK for Visual Studio 2013\SDK\include"
Code:/I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include"Code:/I"C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses" /I"C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\common"Mixing two versions of MSVC headers is also bad.Code:/I"C:\Program Files (x86)\Windows Kits\8.1\Include\shared"
Code:/I"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include"Tim S.Code:/I"C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include"
Last edited by stahta01; 12-27-2014 at 06:23 PM.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
Got it to work without breaking the rules
Note: I have to add the path to the non standard header to the project to do this right.Code:#include <windows.h> #include <Dshow.h> // I had to move this header before the headers inside Streams.h #include "Streams.h"
My Build log; edited because I missed changing the SDK version in my CB Settings.Code:C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses
So, I go with the problem was user error and MS documentation error.Code:cl.exe /nologo /W3 /EHsc /Ox /DNDEBUG /MD /I"C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses" /I"C:\Program Files\Microsoft SDKs\Windows\v7.1\include" /I"C:\Program Files\Microsoft Visual Studio 10.0\VC\include" /c main.cpp /Foobj\ReleaseWin32\main.obj main.cpp link.exe /nologo /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v7.1\lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio 10.0\VC\lib" /out:bin\ReleaseWin32\CRouting.exe msvcrt.lib msvcprt.lib obj\ReleaseWin32\main.obj Output file is bin\ReleaseWin32\CRouting.exe with size 5.50 KB Process terminated with status 0 (0 minute(s), 3 second(s)) 0 error(s), 0 warning(s) (0 minute(s), 3 second(s))
Edit: The MS documentation error was the header Streams.h was implied to be a standard windows header instead of a non-standard header. It likely started out as a non-standard and might have been changed to a standard header after Windows SDK 7.1 or the documentation is very wrong. FYI: These <> brackets implies standard or supplied header. These "" quotes implies non standard or user header. I think all sample headers should use double quotes.
Tim S.
Last edited by stahta01; 12-27-2014 at 06:43 PM.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
You're brilliant Tim!
You taught me how to avoid these errors in the future.
Thank you very much.
Using Windows 10 with Code Blocks and MingW.
By the way, it compiled with #include <Streams.h> instead of #include "Streams.h" too.
So it must be a standard header.
Using Windows 10 with Code Blocks and MingW.
No, that does not mean it is a standard header (it isn't).
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
The term standard in this context refers to something that is specified in the C++ standard.Originally Posted by Ducky
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
FYI: The header Streams.h you wished to use is neither a Standard C++ header nor a normal Windows OS header.
It is a sample windows header; note there was also another header named Streams.h or streams.h that might be or was a normal Windows OS header.
That is a likely cause of the error you got; the wrong Streams.h was being found before the one you wanted to include.
Tim S.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson