About Products Support FAQ Blog

How to compile SDK VC++ samples

image

 

  By Olga Krovyakova - modified October 10, 2023, created April 1, 2019.

Preface:
SolveigMM Video Editing SDK has been developed with using DirectX SDK 9.0 (November 2000). As soon as this version is no longer available for downloading from Microsoft web site, here, it is described how to use the versions that are still available.

Microsoft suggests to use the Latest Platform SDK (Windows SDK 6.1) and Latest DirectX SDK (March 2009) but unfortunately it can not be done easily as some clue headers are missed there, for instance - dxtrans.h

So up to the moment here are two ways to use Microsoft SDK's:

1. Microsoft Windows SDK for Windows Server 2008® and .NET Framework 3.5 ( v6.1  ) + DirectX 9.0 SDK Update - (February 2005) 
2. DirectX 9.0 SDK Update - (February 2005) + DirectX 9.0 SDK Update Extra- (February 2005)


 

TRY Video Editing SDK FREE

 

image

For Microsoft Visual Studio 2008 and higher you should install the additional SDKs as follows:

Microsoft Windows SDK for Windows Server 2008
® and .NET Framework 3.5 ( v6.1 ) 1328.9 MB
http://www.microsoft.com/downloads/details.aspx?FamilyID=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en

DirectX 9.0 SDK Update (February 2005) Extras 35.6 MB
http://www.microsoft.com/downloads/details.aspx?FamilyId=8AF0AFA9-1383-44B4-BC8B-7D6315212323&displaylang=en

DirectShow Base Classes should be compiled with the following key:
C/C++, Language, Treat wchar_t as Built-in type -  No (/Zc:wchar_t-)


After installing the Windows SDK you’ll need to compile the DirectShow Base Classes to obtain the strmbase.lib and strmbasd.lib. By default, base classes are located here:

“\Program Files\Microsoft SDKs\Windows\v6.1\Samples\Multimedia\DirectShow\BaseClasses”

You mustn’t confuse Unicode and Multibyte versions of the base classes’ libraries.

Update the options of your VisualStudio IDE:  add the following paths to Includes list:

1)“\Program Files\Microsoft SDKs\Windows\v6.1\Samples\Multimedia\DirectShow\BaseClasses\” - you should place this path at a very beginning of the “Includes” list;
2)“\DXSDK\Include”;

Add the following paths to Libraries list:

1)“Program Files\Microsoft SDKs\Windows\v6.1\Lib”;
2)“Program Files\Microsoft SDKs\Windows\v6.1\Samples\Multimedia\DirectShow\BaseClasses\Debug”;
3)“Program Files\Microsoft SDKs\Windows\v6.1\Samples\Multimedia\DirectShow\BaseClasses\Release” - Unicode-compiled Base Classes libraries;
4)“Program Files\Microsoft SDKs\Windows\v6.1\Samples\Multimedia\DirectShow\BaseClasses\Debug_MBCS”;
5)“Program Files\Microsoft SDKs\Windows\v6.1\Samples\Multimedia\DirectShow\BaseClasses\Release_MBCS” - MultiByte-compiled Base Classes libraries;
6)“\DXSDK\ Lib”;

image

For Microsoft Visual Studio 2005 you should install the additional SDKs as follows:

1. DirectX 9.0 SDK Update - (February 2005) 154.6 MB
http://www.microsoft.com/downloads/details.aspx?FamilyID=77960733-06E9-47BA-914A-844575031B81&displaylang=en

2. DirectX 9.0 SDK Update (February 2005) Extras 35.6 MB
http://www.microsoft.com/downloads/details.aspx?FamilyId=8AF0AFA9-1383-44B4-BC8B-7D6315212323&displaylang=en

Here are the Headers and libraries directories layout:

image
image

DirectX 9.0 SDK Update Extra (2nd point) contains DirectShow Base Classes that should be compiled and depend on some headers in DirectX 9.0 SDK Update (1st point)

BaseClasses solution is located in this folder:
"..\Extras\DirectShow\Samples\C++\DirectShow\BaseClasses\baseclasses.sln"

Unfortunately some headers require slight modifications; otherwise VC Studio delivers compilation errors.

..\Extras\DirectShow\Samples\C++\DirectShow\BaseClasses\ctlutil.h

COARefTime(LONG);
operator=(LONG); 

should be changed to 

COARefTime(LONG);
// operator=(LONG);
COARefTime& operator=(LONG);

..\Extras\DirectShow\Samples\C++\DirectShow\BaseClasses\wxdebug.cpp

static g_dwLastRefresh = 0;
should be changed to
static DWORD g_dwLastRefresh = 0;

"..\Extras\DirectShow\Samples\C++\DirectShow\BaseClasses\winutil.cpp"
for ( UINT Count = 0;Count < Result;Count++) {

should be changed to

UINT Count = 0;
for ( Count = 0;Count < Result;Count++) {

"..\Extras\DirectShow\Samples\C++\DirectShow\BaseClasses\outputq.cpp"

for (iDone = 0;
iDone < nSamples || (m_nBatched != 0 && m_bSendAnyway);

should be changed to

long iDone = 0;
for (iDone = 0;
iDone < nSamples || (m_nBatched != 0 && m_bSendAnyway);

DirectShow Base Classes should be compiled with the following key:
C/C++, Language, Treat wchar_t as Built-in type -  No (/Zc:wchar_t-)

 

TRY Video Editing SDK FREE

 

 

 About the author

imageOlga Krovyakova is the Technical Support Manager in Solveig Multimedia since 2010.

She is the author of many text and video guidelines of company's products: Video Splitter, HyperCam, WMP Trimmer Plugin, AVI Trimmer+ and TriMP4.

She works with programs every day and therefore knows very well how they work. Сontact Olga via support@solveigmm.com if you have any questions. She will gladly assist you!