Need help importing a function from a DLL!
Can anyone help me with this problem? Basically, I'm trying to call the function 'MessageBoxA' without including windows.h (and by rather linking to 'libuser32.a'). Can this be done? Thanks in advance.
The following gives me an error ([Linker error] undefined reference to 'MessageBoxA'):
Code:
extern "C" int MessageBoxA(int hWnd,const char* lpText,const char* lpCaption,unsigned int uType);
int main()
{
MessageBoxA(0,"Test","Test",0);
return 0;
}
Note: I am using MinGW as my compiler.