I'm trying to make my own short version of the windows header stuff I use, like this for an MessageBox app:
Code:
#ifdef strict
struct handtp { int unused; };
typedef struct handtp* hand;
#else
#define hand void*
#endif
#define wusr __declspec(dllimport)
#define wapi __stdcall
#define pch const char *
#define uint unsigned int
wusr int wapi MessageBoxA (hand, pch, pch, uint);
int __stdcall WinMain (hand hInstance, hand hPrev, pch cmdline, uint showhow)
{
uint unsg = 0;
hand hnul = 0;
pch myadr;
char mystr[] = "mycapt";
myadr = &mystr[0];
MessageBoxA(hnul, myadr, myadr, unsg);
return 0;
}
Why does it not work? I'm getting an unresolved external for the MessageBoxA.