Click to See Complete Forum and Search --> : Setting up WinAPI


infinite
October 9th, 2009, 02:09 AM
I don't think I've ever successfully linked a library before. I'm using the Code::Blocks IDE and I have installed the Windows SDK. I've tried going to

Settings -> Compiler & Debugger settings -> search directories tab

and adding "...\Microsoft SDKs\Windows\v7.0\Include", but when I try and compile a simple source code including <Windows.h> for example, I get a whole heap of errors.

olivthill2
October 9th, 2009, 04:00 AM
If it's your first program, then it probably is a problem of installation. Look at the documentations about it for your environment.

If you want more help, give us more pieces of information, e.g. error messages.

infinite
October 9th, 2009, 01:13 PM
Oh, no, it's not my first program. I've successfully compiled & linked programs using Code::Blocks before.

http://img380.imageshack.us/img380/5616/errors.png

olivthill2
October 12th, 2009, 04:17 AM
sal.h is missing.

Codeplug
October 12th, 2009, 09:10 AM
You can't use the SDK from Microsoft with MinGW. It uses its own headers and libraries.
Download: http://sourceforge.net/projects/mingw/files/MinGW%20API%20for%20MS-Windows/
CVS: http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/w32api/?cvsroot=src

gg