|
From: Keith M. <kei...@to...> - 2006-10-02 13:36:30
|
Responding to JC Denton, I wrote:
> I think your example has been corrupted, because you committed the
> cardinal sin, and posted in HTML. Lines 15 and 38 are:
>
> $ sed -n 15p sample.cc
> HSTMT hstmt; & nbsp; // Statement handle
> ^^^^^^^
>
> $ sed -n 38p sample.cc
> &n bsp; // Execute SQL command "SELECT first name, last_name FROM
> employee".
> ^^^^^^^
Ok. After my earlier rant, I cleaned up your source, removing the
above (corrupt) HTML entities, and removing a few additional spaces,
which had crept in where they shouldn't. Here's your definition of
WinMain:
int WINAPI WinMain (HANDLE hInstance, HANDLE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow)
Contrast that with the example on our web page:
(c.f. http://www.mingw.org/docs.shtml)
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR lpszCmdLine, int nCmdShow)
Changing your definition to the correct one gets rid of your error;
your example builds successfully for me, although it doesn't actually
seem to do anything, when I try to execute it.
Regards,
Keith.
|