Author Topic: Code::Blocks + Platform SDK for Windows XP SP2  (Read 9880 times)


  • Guest
Code::Blocks + Platform SDK for Windows XP SP2
« on: April 26, 2005, 12:11:04 am »
I've tried Code::Blocks and i loved it, useful, slim, it works.

But i have a problem, i'm trying to use the Platform SDK SP2 with it.

Now with Visual C++ Toolkit 2003 and the .Net Framework SDK we just need to add the include, lib and bin paths to Code::Blocks. But with the Platform SDK we have this huge .bat file to set the environment that performs all these tests, and sets several environment variables in the process, and i wouldn't want to permanently include by hand all those in the environment just so i can work with Code::Blocks.

So i am looking for a convenient way to set the environment while i'm compiling. I was thinking of two ways, either the Code::Blocks developing team could include some environment settings that could be chosen by the developers based on their SDKs, or a new feature to allow the execution of a few .bat files to set the environment before compiling.

As i'm asking this, i'm not sure they don't already exist, i did look in the IDE for them but i just played with it for an hour or so, so if they do exist please just point them out, and forgive me wasting your time. ^_^

Thank you.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Code::Blocks + Platform SDK for Windows XP SP2
« Reply #1 on: April 26, 2005, 07:19:26 am »
Oh no-no-no, it's not wasting time at all. See, we should be grateful of having suggestions by users because it's the users that we're doing this for. Never forget that.

Now, regarding your suggestion, frankly I have no idea of how to do it :-P (I'm used to GCC,  Yiannis is the project leader and he's the one who knows all this stuff). Maybe if you use "custom makefiles" you might be able to do it, but I really don't know.

But hey, I got an idea! This might just work. You just need to create a "dummy project" to use with platform SDK, and set all the variables etc.

Then save the project as a template. That'll allow you to use the same settings for future projects :)

Hope that helps.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Code::Blocks + Platform SDK for Windows XP SP2
« Reply #2 on: April 26, 2005, 08:50:21 am »
So i am looking for a convenient way to set the environment while i'm compiling

To use the Platform SDK, not much is needed to be done. Just add to the global compiler settings the PSDK dirs.
Go to "Compile->Compiler options->Microsoft Visual C++ Toolkit 2003->Directories" and add the following (if not already there ;) ):

Compiler: "C:\Program Files\Microsoft SDK\include"
Linker: "C:\Program Files\Microsoft SDK\lib"
Resource compiler: "C:\Program Files\Microsoft SDK\include"

That should do it.
The only thing missing is that "C:\Program Files\Microsoft SDK\bin" will not be in the PATH. So, either add this to your path, or copy rc.exe to "C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin".
I think there was a feature request to add more than one compiler bin dirs in the PATH, so at some time this will be resolved too.

Be patient!
This bug will be fixed soon...