Ok, I managed to get it compiled without any errors Thank you to everybody who helped me. Especially wysota, thanks for sticking out with me, couldn't have done it without your help!

For those of you who might get the same errors. The Postgresql files you need are included with the standard Windows installer. You only need to make sure to also install the Development option (they are all the way down the bottom of the installation options). You also need to add the following environment variables:

INCLUDE: C:\Program Files\PostgreSQL\8.2\include
LIB: C:\Program Files\PostgreSQL\8.2\lib;C:\Program Files\PostgreSQL\8.2\lib\ms (NOTE: I had to add the lib\ms directory otherwise nmake couldn't find libpq.lib which is located in that directory)
PATH: C:\Program Files\PostgreSQL\8.2\bin

That basically is it. It's not that hard, it only took me a couple of days to figure it out. And compilation takes a really long time Now I can finally start on my first project, so I'll be back

Kind regards,

Nick