Author Topic: C::B + Platform SDK Setup  (Read 5002 times)

jazz

  • Guest
C::B + Platform SDK Setup
« on: June 06, 2007, 02:19:13 am »
I've done a fair amount of searching on this but there is nothing that has helped me get this working so far. :(

I have been building a DirectX app using C::B and MinGW without any problems to this point, but now I want to use DirectShow which is part of the Micro$oft Platform SDK.  I have downloaded the PSDK and tried to use it with MinGW but to no avail.  My first question is: is it actually possible to use MinGW with the PSDK at all?

In further attempts to build my project with DirectShow support, I went about trying to install the Visual C++ Toolkit 2003 (as per the wiki) only to find out that it is no longer available and instead has been replaced with Visual C++ 2005 Express Edition.  So i downloaded this and tried to get it to work but then I can't compile anything at all.

I guess my ultimate question is, what do I need in order to use Code::Blocks with the Platform SDK so I can use the DirectShow interfaces from my project?  If I'm aware of what compiler/tools work then I should be able to muddle through getting it all to work.

Thanks.

wxLearner

  • Guest
Re: C::B + Platform SDK Setup
« Reply #1 on: June 06, 2007, 10:58:31 am »
You can download the VC++ Toolkit 2003 here, but it should work with VC8 too. The integration of the VC++ Toolkit 2003 is described here.

jazz

  • Guest
Re: C::B + Platform SDK Setup
« Reply #2 on: June 06, 2007, 01:52:06 pm »
Thanks.  I'll give that a shot. :)

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Re: C::B + Platform SDK Setup
« Reply #3 on: June 06, 2007, 07:15:23 pm »
The PSDK and DX are in .lib format, and are made for The VS compiler. Download VSC++ Express 2005 and use it through there. VS 2003 Express is outdated, and no longer offered anymore. It's been replaced with VS 2005 Express, which comes with it's own IDE (but you can use it in C::B all the same, like I do).

Other than that, you just need to point C::B to the include and lib folders of the PSDK and DX SDK. this takes 2 seconds in the compilers and debuggers section of the options.
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

jazz

  • Guest
Re: C::B + Platform SDK Setup
« Reply #4 on: June 07, 2007, 01:08:14 am »
Well for starters, I could compile and link against the DirectX SDK with no problems.  Why would the PSDK be any different?  Secondly, it fails to compile long before it gets to linking (obviously). 

I thought I had tried getting C::B to work with Visual C++ 2005 Express and it didn't work, but if you have it working then obviously I didn't try hard enough.  I'll give it another shot too, but do you happen to know of any resources that could help me get it working?

I really wish I didn't have all these compiler setup issue.  I just want to write code dammit! :(

jazz

  • Guest
Re: C::B + Platform SDK Setup
« Reply #5 on: June 07, 2007, 03:46:37 am »
Ok.  Weird.  I now have BOTH Visual C++ 2005 Express AND the Visual C++ Toolkit 2003 working with both the Platform SDK and the DirectX SDK.  Only with a minimal test app though as my main project will not compile.  For some reason the standard C++ string classes and templates seem to operate differently from the ones that comes with MinGW.

Thanks guys.

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Re: C::B + Platform SDK Setup
« Reply #6 on: June 07, 2007, 10:56:15 am »
I thought I had tried getting C::B to work with Visual C++ 2005 Express and it didn't work
You have to choose the proper compiler in the project options first... (C::B will actually choose GCC as your default compiler, even if only VSC++ or another compiler is found.  :roll: ) Then you have to add your folders into your global compiler and debugger setup for the platform SDK and DX DSK. You need the libs folder, and the includes folder. If you do that properly, there is nothing that can go wrong, or not work.

Go into COMPILER AND DEBUGGER under the SETTINGS options.
Then click on SEARCH DIRECTORIES

Under the compiler tab, you want the folders with the includes.. Here are my settings, but the actual folder names depends on which version of the SDKs you've got.

C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
C:\Program Files\Microsoft DirectX SDK (April 2007)\Include

Then you have to go to the linker tab, and point to your lib directories. Once again, your actual folders might be different. You might be using the 64 bit DX SDK.

C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
C:\Program Files\Microsoft DirectX SDK (April 2007)\Lib\x86

And then, you have to add the proper libraries as needed to your projects in their own compiler settings. If you got DX to work, you obviously know how to do this.
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~