• 0

Windows.h include file missing


Question

17 answers to this question

Recommended Posts

  • 0

I used the one from http://www.microsoft.com/msdownload/platfo...FULLInstall.htm. Downloaded and Installed it all. I tried to compile something and it cam up with this error:

error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function _WinMain@16

It might be the code but I'm not sure. Here's the code:

#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 
    LPSTR lpCmdLine, int nCmdShow)
{
    MessageBox(NULL, "Hello World!", "Note", MB_OK);
    return 0;
}

This was my first windowed appication and I know I have probably mucked up

  • 0
Create build.bat that contains:

cl.exe file.c /link "user32.lib kernel32.lib gdi32.lib"

---

Better idea would be to learn how to use nmake and vc++ makefiles (no idea if nmake is part of the toolkit though).

585117654[/snapback]

No, nmake is part of the Platform SDK

  • 0

I couldn't resist pointing out, on a Linux, you'd just type the command line once, then hit the "up" arrow to recall a previously used command.

"unresolved external symbol"- even now, looking back on my Windows programming days, that phrase sends a shiver down my spine...looking up all those "LNK" numbers in the docs, only to find some 20 possible causes for each one...*br-r-r*

Hey! Maybe you could write some kind of shell program in Dos, where a single keypress activates it, and it recovers your command lines from a file! But could you have it activated in the background so that it caught and filed each command line as you typed it?

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.