1717
1818#include " arrow/flight/sql/odbc/odbc_impl/system_dsn.h"
1919
20- #include " arrow/flight/sql/odbc/odbc_impl/config/configuration.h"
21- #include " arrow/flight/sql/odbc/odbc_impl/flight_sql_connection.h"
22- #include " arrow/flight/sql/odbc/odbc_impl/ui/dsn_configuration_window.h"
23- #include " arrow/flight/sql/odbc/odbc_impl/ui/window.h"
24- #include " arrow/flight/sql/odbc/odbc_impl/util.h"
2520#include " arrow/result.h"
2621#include " arrow/util/utf8.h"
2722
28- #include < odbcinst.h>
2923#include < sstream>
3024
3125namespace arrow ::flight::sql::odbc {
3226
3327using config::Configuration;
3428
35- void PostError (DWORD error_code, LPCWSTR error_msg) {
29+ void PostError (DWORD error_code, LPWSTR error_msg) {
30+ #if defined _WIN32
3631 MessageBox (NULL , error_msg, L" Error!" , MB_ICONEXCLAMATION | MB_OK );
32+ #endif // _WIN32
3733 SQLPostInstallerError (error_code, error_msg);
3834}
3935
@@ -42,7 +38,7 @@ void PostArrowUtilError(arrow::Status error_status) {
4238 std::wstring werror_msg = arrow::util::UTF8ToWideString (error_msg).ValueOr (
4339 L" Error during utf8 to wide string conversion" );
4440
45- PostError (ODBC_ERROR_GENERAL_ERR , werror_msg.c_str ());
41+ PostError (ODBC_ERROR_GENERAL_ERR , ( LPWSTR ) werror_msg.c_str ());
4642}
4743
4844void PostLastInstallerError () {
@@ -55,7 +51,7 @@ void PostLastInstallerError() {
5551 buf << L" Message: \" " << msg << L" \" , Code: " << code;
5652 std::wstring error_msg = buf.str ();
5753
58- PostError (code, error_msg.c_str ());
54+ PostError (code, ( LPWSTR ) error_msg.c_str ());
5955}
6056
6157/* *
0 commit comments