The problem with SendMessage is based in Windows.
Windows traditionally has two sets of APIs, Unicode and Ansi. Functions that handle text in any way therefore have two variants, -W suffix for Unicode and -A suffix for Ansi. So there's a GetWindowTextW() and a GetWindowTextA() function; both return the text of the window, one returns a Unicode string, the other returns an Ansi string.
To make using them easier, the application sets a setting in the project and it causes the windows SDK to define a function name to either to those functions. Basically it does this:
Of course, Linux doesn't have this, so SendMessageA is an unknown symbol there.
Windows traditionally has two sets of APIs, Unicode and Ansi. Functions that handle text in any way therefore have two variants, -W suffix for Unicode and -A suffix for Ansi. So there's a GetWindowTextW() and a GetWindowTextA() function; both return the text of the window, one returns a Unicode string, the other returns an Ansi string.
To make using them easier, the application sets a setting in the project and it causes the windows SDK to define a function name to either to those functions. Basically it does this:
#ifdef UNICODE #define GetWindowText GetWindowTextW #else #define GetWindowText GetWindowTextA #endifUnfortunately, SendMessage is a Windows API function that has this same behavior, therefore the Windows SDK does
#define SendMessage SendMessageAfor MCServer (since we're an Ansi app). Unfortunately this also fools the MSVC IntelliSense to offer SendMessageA, instead of SendMessage. You just need to remember this
Of course, Linux doesn't have this, so SendMessageA is an unknown symbol there.