Skip to main content
gamedev.net
🔒 Locked

MessageBox() difficulty

Started by ApolloGod Jun 27, 2004 at 10:20 PM 2 replies 650+ views
Original Post
ApolloGod
ApolloGod
I am trying to create a message box in a console app and I get this error: "undefined reference to MessageBox@16". Here is my code for the box: MessageBox(NULL, "Hello", "Bye", IDOK); Any help is appreciated!
ApolloGod
ApolloGod
I thought windows.h included user32 and kernel32.
ApochPiQ
ApochPiQ
The header file only includes prototypes for the functions. The actual functions are in the .lib files. If you aren't linking your project with the user32.lib file, you won't be able to use the functions in user32.lib, and by extension the functions in user32.h.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.