MSDN gives that info in here.#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#pragma comment(lib, "user32.lib")
int main(void){
return MessageBoxA(0,"One","Two",0);
}
Thanks, that worked. But, I have some questions about this:
o Why can't it just pick up the user32.lib file from the search path I've given it? (Actually why doesn't it just work? With other C compilers (gcc, lccwin, DMC) it doesn't need anything extra to link properly.)
o Will I need one of these for each library such as kernel32.lib etc? (I assume the pragmas are only needed in one module)
o Is there any #if expression I can use to detect that Pelles C is running? (In case I need to turn off the pragma when I want the same code to run on, say, lccwin, which doesn't like the syntax)