When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
1 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

int MessageBoxA(void* hwnd, char* text, char* caption, int type);
int main(void) {
MessageBox(0, "Message", "Caption", 0);
}```
what's not working?
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "int __cdecl MessageBoxA(void *,char const *,char const *,int)" (?MessageBoxA@@YAHPEAXPEBD1H@Z) referenced in function main
you need to link the windows shared libraries
^
the question is also very odd. Yes, you can definitely implement C++ functions without windows.h, but if you want to use window's functions, you must use windows.h
Is there a way to implement windows functions in c++ without using #include <windows.h>
thanks i was distracted and didn't see that
no worries
btw i am reading this https://www.reddit.com/r/C_Programming/comments/jdbi38/how_to_write_a_header_that_calls_windows_api/
maybe i am missing the function pointer?
that post is about forward-declaration, the definitions are still included somewhere else
kk thanks
@wet swan
Please don't delete forum posts. They can be helpful to refer to later and other members can learn from them. In the future you can use !solved to close a post and mark a post as solved.
@wet swan Has your question been resolved? If so, run !solved :)
!solved